Package io.netty.buffer
Interface AdaptivePoolingAllocator.ChunkAllocator
-
- All Known Implementing Classes:
AdaptiveByteBufAllocator.DirectChunkAllocator,AdaptiveByteBufAllocator.HeapChunkAllocator
- Enclosing class:
- AdaptivePoolingAllocator
static interface AdaptivePoolingAllocator.ChunkAllocatorThe strategy for howAdaptivePoolingAllocatorshould allocate chunk buffers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AbstractByteBufallocate(int initialCapacity, int maxCapacity)Allocate a buffer for a chunk.
-
-
-
Method Detail
-
allocate
AbstractByteBuf allocate(int initialCapacity, int maxCapacity)
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.
-
-