Class AbstractIoUringBufferRingAllocator

    • Constructor Detail

      • AbstractIoUringBufferRingAllocator

        protected AbstractIoUringBufferRingAllocator​(io.netty.buffer.ByteBufAllocator allocator,
                                                     boolean largeAllocation)
        Creates new instance.
        Parameters:
        allocator - the ByteBufAllocator to use for the allocations
        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 Detail

      • lastBytesRead

        public void lastBytesRead​(int attempted,
                                  int actual)
        Does nothing by default, sub-classes might override this.
        Specified by:
        lastBytesRead in interface IoUringBufferRingAllocator
        Parameters:
        attempted - the attempted bytes to read.
        actual - the number of bytes that could be read.
      • nextBufferSize

        protected abstract int nextBufferSize()
        Return the next buffer size of each ByteBuf that is put into the buffer ring.
        Returns:
        the next size.