C# Class Akka.IO.DirectByteBufferPool

INTERNAL API A buffer pool which keeps a free list of direct buffers of a specified default size in a simple fixed size stack. If the stack is full the buffer is de-referenced and available to be freed by normal garbage collection.
Inheritance: IBufferPool
显示文件 Open project: rogeralsing/akka.net Class Usage Examples

Public Methods

Method Description
Acquire ( ) : Akka.IO.ByteBuffer
DirectByteBufferPool ( int defaultBufferSize, int maxPoolEntries )
Release ( Akka.IO.ByteBuffer buf ) : void

Private Methods

Method Description
Allocate ( int size ) : Akka.IO.ByteBuffer
OfferBufferToPool ( Akka.IO.ByteBuffer buf ) : void
TakeBufferFromPool ( ) : Akka.IO.ByteBuffer

Method Details

Acquire() public method

public Acquire ( ) : Akka.IO.ByteBuffer
return Akka.IO.ByteBuffer

DirectByteBufferPool() public method

public DirectByteBufferPool ( int defaultBufferSize, int maxPoolEntries )
defaultBufferSize int
maxPoolEntries int

Release() public method

public Release ( Akka.IO.ByteBuffer buf ) : void
buf Akka.IO.ByteBuffer
return void