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 ByteBufAllocator
allocator
-
Constructor Summary
Constructors Modifier Constructor Description private
HeapChunkAllocator(ByteBufAllocator allocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractByteBuf
allocate(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.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.
-
-