|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AllocationPolicy
Interface describing the buffer allocation policy.
The implementations will be initialized by setting the list of buffers init(List),
and every allocation will call #getActiveBuffer(OffHeapMemoryBuffer, int),
passing the previously (possibly null) buffer that failed to allocate and the number of the current allocation
| Method Summary | |
|---|---|
ByteBufferAllocator |
getActiveAllocator(ByteBufferAllocator previousAllocator,
int allocationNumber)
Returns the ByteBufferAllocator to use to allocate. |
void |
init(List<ByteBufferAllocator> allocators)
Initialization function. |
void |
reset()
Reset internal state |
| Method Detail |
|---|
void init(List<ByteBufferAllocator> allocators)
buffers -
ByteBufferAllocator getActiveAllocator(ByteBufferAllocator previousAllocator,
int allocationNumber)
ByteBufferAllocator to use to allocate.
previousAllocator - : the previously used ByteBufferAllocator, or null if it's the first allocationallocationNumber - : the number of time the allocation has already failed.
ByteBufferAllocator to use, or null if allocation has failed.void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||