clear() — netty Function Reference
Architecture documentation for the clear() function in ConcurrentSkipListIntObjMultimap.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 87a3b042_a2f2_535c_3afe_d4271fbd79f4["clear()"] d9a8da36_aab9_ab33_dc67_870b34dcd270["ConcurrentSkipListIntObjMultimap"] 87a3b042_a2f2_535c_3afe_d4271fbd79f4 -->|defined in| d9a8da36_aab9_ab33_dc67_870b34dcd270 acca47c3_12ae_23bb_59d5_d6000a11335e["acquireFence()"] 87a3b042_a2f2_535c_3afe_d4271fbd79f4 -->|calls| acca47c3_12ae_23bb_59d5_d6000a11335e 14308445_2437_e26b_41bb_c7458d3b14e0["unlinkNode()"] 87a3b042_a2f2_535c_3afe_d4271fbd79f4 -->|calls| 14308445_2437_e26b_41bb_c7458d3b14e0 f9a987be_7587_17d3_1e33_3b91accd15b7["addCount()"] 87a3b042_a2f2_535c_3afe_d4271fbd79f4 -->|calls| f9a987be_7587_17d3_1e33_3b91accd15b7 style 87a3b042_a2f2_535c_3afe_d4271fbd79f4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimap.java lines 1220–1250
public void clear() {
Index<V> h, r, d; Node<V> b;
acquireFence();
while ((h = head) != null) {
if ((r = h.right) != null) { // remove indices
RIGHT.compareAndSet(h, r, null);
} else if ((d = h.down) != null) { // remove levels
HEAD.compareAndSet(this, h, d);
} else {
long count = 0L;
if ((b = h.node) != null) { // remove nodes
Node<V> n; V v;
while ((n = b.next) != null) {
if ((v = n.val) != null &&
VAL.compareAndSet(n, v, null)) {
--count;
v = null;
}
if (v == null) {
unlinkNode(b, n, noKey);
}
}
}
if (count != 0L) {
addCount(count);
} else {
break;
}
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does clear() do?
clear() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimap.java.
Where is clear() defined?
clear() is defined in common/src/main/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimap.java at line 1220.
What does clear() call?
clear() calls 3 function(s): acquireFence, addCount, unlinkNode.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free