Home / Function/ MpscAtomicIntegerArrayQueue() — netty Function Reference

MpscAtomicIntegerArrayQueue() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f4575ddb_f917_95b9_7ae3_68f182f78f51["MpscAtomicIntegerArrayQueue()"]
  c00a7e8d_e19a_6d4a_6887_5d0634281bed["MpscAtomicIntegerArrayQueue"]
  f4575ddb_f917_95b9_7ae3_68f182f78f51 -->|defined in| c00a7e8d_e19a_6d4a_6887_5d0634281bed
  style f4575ddb_f917_95b9_7ae3_68f182f78f51 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/concurrent/MpscIntQueue.java lines 110–123

        public MpscAtomicIntegerArrayQueue(int capacity, int emptyValue) {
            super(MathUtil.safeFindNextPositivePowerOfTwo(capacity));
            if (emptyValue != 0) {
                this.emptyValue = emptyValue;
                int end = length() - 1;
                for (int i = 0; i < end; i++) {
                    lazySet(i, emptyValue);
                }
                getAndSet(end, emptyValue); // 'getAndSet' acts as a full barrier, giving us initialization safety.
            } else {
                this.emptyValue = 0;
            }
            mask = length() - 1;
        }

Domain

Subdomains

Frequently Asked Questions

What does MpscAtomicIntegerArrayQueue() do?
MpscAtomicIntegerArrayQueue() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/MpscIntQueue.java.
Where is MpscAtomicIntegerArrayQueue() defined?
MpscAtomicIntegerArrayQueue() is defined in common/src/main/java/io/netty/util/concurrent/MpscIntQueue.java at line 110.

Analyze Your Own Codebase

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

Try Supermodel Free