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 Type
    Method
    Description
    allocate(int initialCapacity, int maxCapacity)
    Allocate a buffer for a chunk.
  • Method Details

    • allocate

      AbstractByteBuf allocate(int initialCapacity, int maxCapacity)
      Allocate a buffer for a chunk. This can be any kind of AbstractByteBuf implementation.
      Parameters:
      initialCapacity - The initial capacity of the returned AbstractByteBuf.
      maxCapacity - The maximum capacity of the returned AbstractByteBuf.
      Returns:
      The buffer that represents the chunk memory.