Class CompletionQueue

java.lang.Object
io.netty.channel.uring.CompletionQueue

final class CompletionQueue extends Object
Completion queue implementation for io_uring.
  • Field Details

    • INT_HANDLE

      private static final VarHandle INT_HANDLE
    • CQE_USER_DATA_FIELD

      private static final int CQE_USER_DATA_FIELD
      See Also:
    • CQE_RES_FIELD

      private static final int CQE_RES_FIELD
      See Also:
    • CQE_FLAGS_FIELD

      private static final int CQE_FLAGS_FIELD
      See Also:
    • khead

      private final ByteBuffer khead
    • ktail

      private final ByteBuffer ktail
    • kflags

      private final ByteBuffer kflags
    • completionQueueArray

      private final ByteBuffer completionQueueArray
    • extraCqeData

      private final ByteBuffer[] extraCqeData
    • ringSize

      final int ringSize
    • ringAddress

      final long ringAddress
    • ringFd

      final int ringFd
    • ringEntries

      final int ringEntries
    • ringCapacity

      final int ringCapacity
    • cqeLength

      private final int cqeLength
    • ringMask

      private final int ringMask
    • ringHead

      private int ringHead
    • closed

      private boolean closed
  • Constructor Details

    • CompletionQueue

      CompletionQueue(ByteBuffer kHead, ByteBuffer kTail, int ringMask, int ringEntries, ByteBuffer kflags, ByteBuffer completionQueueArray, int ringSize, long ringAddress, int ringFd, int ringCapacity, int cqeLength, boolean extraCqeDataNeeded)
  • Method Details

    • close

      void close()
    • flags

      int flags()
    • hasCompletions

      boolean hasCompletions()
      Returns true if any completion event is ready to be processed by process(CompletionCallback), false otherwise.
    • count

      int count()
    • process

      long process(CompletionCallback callback)
      Process the completion events in the CompletionQueue and return the number of processed events.
    • extraCqeData

      private ByteBuffer extraCqeData(int cqeIdx)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • cqeIdx

      private static int cqeIdx(int ringHead, int ringMask)