Interface IoUringBufferRingAllocator

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      io.netty.buffer.ByteBuf allocate()
      Creates a new receive buffer to use by the buffer ring.
      default void allocateBatch​(Consumer<io.netty.buffer.ByteBuf> consumer, int num)
      Fill in num of ByteBufs.
      void lastBytesRead​(int attempted, int actual)
      Set the bytes that have been read for the last read operation that was full-filled out of the buffer ring.
    • Method Detail

      • allocate

        io.netty.buffer.ByteBuf allocate()
        Creates a new receive buffer to use by the buffer ring. The returned ByteBuf must be direct.
      • lastBytesRead

        void lastBytesRead​(int attempted,
                           int actual)
        Set the bytes that have been read for the last read operation that was full-filled out of the buffer ring.
        Parameters:
        attempted - the attempted bytes to read.
        actual - the number of bytes that could be read.
      • allocateBatch

        default void allocateBatch​(Consumer<io.netty.buffer.ByteBuf> consumer,
                                   int num)
        Fill in num of ByteBufs. Important: The Consumer MUST not escape this method.
        Parameters:
        consumer - the Consumer that will consume the buffers.
        num - the number of buffers that are passed to Consumer.accept(Object).