Home / Function/ CompletionQueue() — netty Function Reference

CompletionQueue() — netty Function Reference

Architecture documentation for the CompletionQueue() function in CompletionQueue.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4ec6e1f8_0508_9d31_2201_1d63f5a25670["CompletionQueue()"]
  af6dd3bb_1c78_efaf_ac7c_5f13fef08613["CompletionQueue"]
  4ec6e1f8_0508_9d31_2201_1d63f5a25670 -->|defined in| af6dd3bb_1c78_efaf_ac7c_5f13fef08613
  style 4ec6e1f8_0508_9d31_2201_1d63f5a25670 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/CompletionQueue.java lines 56–86

    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) {
        this.khead = kHead;
        this.ktail = kTail;
        this.completionQueueArray = completionQueueArray;
        this.ringSize = ringSize;
        this.ringAddress = ringAddress;
        this.ringFd = ringFd;
        this.ringCapacity = ringCapacity;
        this.cqeLength = cqeLength;
        this.ringEntries = ringEntries;
        this.kflags = kflags;
        this.ringMask = ringMask;
        ringHead = (int) INT_HANDLE.getVolatile(kHead, 0);

        if (extraCqeDataNeeded) {
            // Let's create the slices up front to reduce GC-pressure and also ensure that the user
            // can not escape the memory range.
            // We slice every Native.CQE_SIZE to support IORING_SETUP_CQE32 and IORING_SETUP_CQE_MIXED.
            this.extraCqeData = new ByteBuffer[ringEntries];
            for (int i = 0; i < ringEntries; i++) {
                int position = i * cqeLength;
                completionQueueArray.position(position).limit(position + Native.CQE_SIZE);
                extraCqeData[i] = completionQueueArray.slice();
                completionQueueArray.clear();
            }
        } else {
            this.extraCqeData = null;
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does CompletionQueue() do?
CompletionQueue() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/CompletionQueue.java.
Where is CompletionQueue() defined?
CompletionQueue() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/CompletionQueue.java at line 56.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free