Interface AdaptivePoolingAllocator.ChunkAllocator
- All Known Implementing Classes:
AdaptiveByteBufAllocator.DirectChunkAllocator, AdaptiveByteBufAllocator.HeapChunkAllocator
- Enclosing class:
AdaptivePoolingAllocator
static interface AdaptivePoolingAllocator.ChunkAllocator
The strategy for how
AdaptivePoolingAllocator should allocate chunk buffers.-
Method Summary
Modifier and TypeMethodDescriptionallocate(int initialCapacity, int maxCapacity) Allocate a buffer for a chunk.
-
Method Details
-
allocate
Allocate a buffer for a chunk. This can be any kind ofAbstractByteBufimplementation.- Parameters:
initialCapacity- The initial capacity of the returnedAbstractByteBuf.maxCapacity- The maximum capacity of the returnedAbstractByteBuf.- Returns:
- The buffer that represents the chunk memory.
-