Package io.netty.buffer
Class AdaptiveByteBufAllocator.HeapChunkAllocator
- java.lang.Object
-
- io.netty.buffer.AdaptiveByteBufAllocator.HeapChunkAllocator
-
- All Implemented Interfaces:
AdaptivePoolingAllocator.ChunkAllocator
- Enclosing class:
- AdaptiveByteBufAllocator
private static final class AdaptiveByteBufAllocator.HeapChunkAllocator extends java.lang.Object implements AdaptivePoolingAllocator.ChunkAllocator
-
-
Field Summary
Fields Modifier and Type Field Description private ByteBufAllocatorallocator
-
Constructor Summary
Constructors Modifier Constructor Description privateHeapChunkAllocator(ByteBufAllocator allocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractByteBufallocate(int initialCapacity, int maxCapacity)Allocate a buffer for a chunk.
-
-
-
Field Detail
-
allocator
private final ByteBufAllocator allocator
-
-
Constructor Detail
-
HeapChunkAllocator
private HeapChunkAllocator(ByteBufAllocator allocator)
-
-
Method Detail
-
allocate
public AbstractByteBuf allocate(int initialCapacity, int maxCapacity)
Description copied from interface:AdaptivePoolingAllocator.ChunkAllocatorAllocate a buffer for a chunk. This can be any kind ofAbstractByteBufimplementation.- Specified by:
allocatein interfaceAdaptivePoolingAllocator.ChunkAllocator- Parameters:
initialCapacity- The initial capacity of the returnedAbstractByteBuf.maxCapacity- The maximum capacity of the returnedAbstractByteBuf.- Returns:
- The buffer that represents the chunk memory.
-
-