Class IoUringAdaptiveBufferRingAllocator

java.lang.Object
io.netty.channel.uring.AbstractIoUringBufferRingAllocator
io.netty.channel.uring.IoUringAdaptiveBufferRingAllocator
All Implemented Interfaces:
IoUringBufferRingAllocator

public final class IoUringAdaptiveBufferRingAllocator extends AbstractIoUringBufferRingAllocator
IoUringBufferRingAllocator implementation which uses an adaptive strategy to allocate buffers, which will decrease / increase the buffer size depending on if the allocated buffers were completely used or not before.
  • Field Details

  • Constructor Details

    • IoUringAdaptiveBufferRingAllocator

      public IoUringAdaptiveBufferRingAllocator()
    • IoUringAdaptiveBufferRingAllocator

      public IoUringAdaptiveBufferRingAllocator(ByteBufAllocator allocator)
      Creates new instance.
      Parameters:
      allocator - the ByteBufAllocator to use.
    • IoUringAdaptiveBufferRingAllocator

      public IoUringAdaptiveBufferRingAllocator(ByteBufAllocator allocator, int minimum, int initial, int maximum)
      Creates new instance.
      Parameters:
      allocator - the ByteBufAllocator to use for the allocations
      minimum - the inclusive lower bound of the expected buffer size
      initial - the initial buffer size when no feed back was received
      maximum - the inclusive upper bound of the expected buffer size
    • IoUringAdaptiveBufferRingAllocator

      public IoUringAdaptiveBufferRingAllocator(ByteBufAllocator allocator, int minimum, int initial, int maximum, boolean largeAllocation)
      Creates new instance.
      Parameters:
      allocator - the ByteBufAllocator to use for the allocations
      minimum - the inclusive lower bound of the expected buffer size
      initial - the initial buffer size when no feed back was received
      maximum - the inclusive upper bound of the expected buffer size
      largeAllocation - true if we should do a large allocation for the whole buffer ring and then slice out the buffers or false if we should do one allocation per buffer.
  • Method Details