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 Object
implements AdaptivePoolingAllocator.ChunkAllocator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocate
(int initialCapacity, int maxCapacity) Allocate a buffer for a chunk.
-
Field Details
-
allocator
-
-
Constructor Details
-
HeapChunkAllocator
-
-
Method Details
-
allocate
Description copied from interface:AdaptivePoolingAllocator.ChunkAllocator
Allocate a buffer for a chunk. This can be any kind ofAbstractByteBuf
implementation.- Specified by:
allocate
in 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.
-