retain0() — netty Function Reference
Architecture documentation for the retain0() function in RefCnt.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 87c0d5da_2856_f6c1_81a2_36cf52924564["retain0()"] f3598a09_a371_18eb_921b_dedcb34850b7["VarHandleRefCnt"] 87c0d5da_2856_f6c1_81a2_36cf52924564 -->|defined in| f3598a09_a371_18eb_921b_dedcb34850b7 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094["retain0()"] 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 -->|calls| 87c0d5da_2856_f6c1_81a2_36cf52924564 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094["retain0()"] 87c0d5da_2856_f6c1_81a2_36cf52924564 -->|calls| 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 style 87c0d5da_2856_f6c1_81a2_36cf52924564 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/internal/RefCnt.java lines 340–349
private static void retain0(RefCnt instance, int increment) {
// oldRef & 0x80000001 stands for oldRef < 0 || oldRef is odd
// NOTE: we're optimizing for inlined and constant folded increment here -> which will make
// Integer.MAX_VALUE - increment to be computed at compile time
int oldRef = (int) VH.getAndAdd(instance, increment);
if ((oldRef & 0x80000001) != 0 || oldRef > Integer.MAX_VALUE - increment) {
VH.getAndAdd(instance, -increment);
throw new IllegalReferenceCountException(0, increment >>> 1);
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does retain0() do?
retain0() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/RefCnt.java.
Where is retain0() defined?
retain0() is defined in common/src/main/java/io/netty/util/internal/RefCnt.java at line 340.
What does retain0() call?
retain0() calls 1 function(s): retain0.
What calls retain0()?
retain0() is called by 1 function(s): retain0.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free