retain0() — netty Function Reference
Architecture documentation for the retain0() function in RefCnt.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094["retain0()"] e71c7596_f8e0_1394_7485_74fd2ca83bf0["AtomicRefCnt"] 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 -->|defined in| e71c7596_f8e0_1394_7485_74fd2ca83bf0 87c0d5da_2856_f6c1_81a2_36cf52924564["retain0()"] 87c0d5da_2856_f6c1_81a2_36cf52924564 -->|calls| 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 c7f19423_c5ad_a4f9_dc2f_3164b088e51a["retain0()"] c7f19423_c5ad_a4f9_dc2f_3164b088e51a -->|calls| 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 77b8114c_848a_3218_c7ac_72af15ed5a58["retain()"] 77b8114c_848a_3218_c7ac_72af15ed5a58 -->|calls| 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 bfc7a3f3_f7b2_386a_dd1a_64aacd928e4b["retain()"] bfc7a3f3_f7b2_386a_dd1a_64aacd928e4b -->|calls| 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 f2976590_e318_61b3_8ee1_df82a5fda531["retain()"] f2976590_e318_61b3_8ee1_df82a5fda531 -->|calls| 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 87c0d5da_2856_f6c1_81a2_36cf52924564["retain0()"] 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 -->|calls| 87c0d5da_2856_f6c1_81a2_36cf52924564 style 2f9c7e0d_83e1_98fc_1a83_b1192ccb6094 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/internal/RefCnt.java lines 262–271
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 = UPDATER.getAndAdd(instance, increment);
if ((oldRef & 0x80000001) != 0 || oldRef > Integer.MAX_VALUE - increment) {
UPDATER.getAndAdd(instance, -increment);
throw new IllegalReferenceCountException(0, increment >>> 1);
}
}
Domain
Subdomains
Calls
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 262.
What does retain0() call?
retain0() calls 1 function(s): retain0.
What calls retain0()?
retain0() is called by 5 function(s): retain, retain, retain, retain0, retain0.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free