Class Overview
Allocator
implementation that instantiate ByteBuffers of fixed size, called slices.
Public Constructors
public
FixedSizeByteBufferAllocatorImpl
(int number, int totalSize, int sliceSize, int numberOfSegments)
Parameters
number
| : internal identifier of the allocator |
totalSize
| : the internal buffer |
sliceSize
| : arbitrary number of the buffer. |
numberOfSegments
| : number of parent ByteBuffer to allocate.
|
Public Methods
public
int
getCapacity
()
public
int
getSliceSize
()
Protected Methods
protected
ByteBuffer
findFreeBuffer
(int capacity)
protected
void
init
(int numberOfSegments)