Home / Function/ doRemoveLastEntry() — netty Function Reference

doRemoveLastEntry() — netty Function Reference

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

Function java CommonUtil Concurrent calls 5 called by 1

Entity Profile

Dependency Diagram

graph TD
  c91f6f32_c06b_465f_f613_c43e4ac69459["doRemoveLastEntry()"]
  d9a8da36_aab9_ab33_dc67_870b34dcd270["ConcurrentSkipListIntObjMultimap"]
  c91f6f32_c06b_465f_f613_c43e4ac69459 -->|defined in| d9a8da36_aab9_ab33_dc67_870b34dcd270
  bbd01127_cb0a_82a2_2956_18f50c5803d4["pollLastEntry()"]
  bbd01127_cb0a_82a2_2956_18f50c5803d4 -->|calls| c91f6f32_c06b_465f_f613_c43e4ac69459
  acca47c3_12ae_23bb_59d5_d6000a11335e["acquireFence()"]
  c91f6f32_c06b_465f_f613_c43e4ac69459 -->|calls| acca47c3_12ae_23bb_59d5_d6000a11335e
  14308445_2437_e26b_41bb_c7458d3b14e0["unlinkNode()"]
  c91f6f32_c06b_465f_f613_c43e4ac69459 -->|calls| 14308445_2437_e26b_41bb_c7458d3b14e0
  a5591d9d_8462_4796_8a91_2dfef6e505cf["tryReduceLevel()"]
  c91f6f32_c06b_465f_f613_c43e4ac69459 -->|calls| a5591d9d_8462_4796_8a91_2dfef6e505cf
  ff16b6d0_47d8_82e1_a033_998f1f35233f["findPredecessor()"]
  c91f6f32_c06b_465f_f613_c43e4ac69459 -->|calls| ff16b6d0_47d8_82e1_a033_998f1f35233f
  f9a987be_7587_17d3_1e33_3b91accd15b7["addCount()"]
  c91f6f32_c06b_465f_f613_c43e4ac69459 -->|calls| f9a987be_7587_17d3_1e33_3b91accd15b7
  style c91f6f32_c06b_465f_f613_c43e4ac69459 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimap.java lines 962–1013

    private IntEntry<V> doRemoveLastEntry() {
        outer: for (;;) {
            Index<V> q; Node<V> b;
            acquireFence();
            if ((q = head) == null) {
                break;
            }
            for (;;) {
                Index<V> d, r; Node<V> p;
                while ((r = q.right) != null) {
                    if ((p = r.node) == null || p.val == null) {
                        RIGHT.compareAndSet(q, r, r.right);
                    } else if (p.next != null) {
                        q = r;  // continue only if a successor
                    } else {
                        break;
                    }
                }
                if ((d = q.down) != null) {
                    q = d;
                } else {
                    b = q.node;
                    break;
                }
            }
            if (b != null) {
                for (;;) {
                    Node<V> n; int k; V v;
                    if ((n = b.next) == null) {
                        if (b.key == noKey) { // empty
                            break outer;
                        } else {
                            break; // retry
                        }
                    } else if ((k = n.key) == noKey) {
                        break;
                    } else if ((v = n.val) == null) {
                        unlinkNode(b, n, noKey);
                    } else if (n.next != null) {
                        b = n;
                    } else if (VAL.compareAndSet(n, v, null)) {
                        unlinkNode(b, n, noKey);
                        tryReduceLevel();
                        findPredecessor(k); // clean index
                        addCount(-1L);
                        return new IntEntry<V>(k, v);
                    }
                }
            }
        }
        return null;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does doRemoveLastEntry() do?
doRemoveLastEntry() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimap.java.
Where is doRemoveLastEntry() defined?
doRemoveLastEntry() is defined in common/src/main/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimap.java at line 962.
What does doRemoveLastEntry() call?
doRemoveLastEntry() calls 5 function(s): acquireFence, addCount, findPredecessor, tryReduceLevel, unlinkNode.
What calls doRemoveLastEntry()?
doRemoveLastEntry() is called by 1 function(s): pollLastEntry.

Analyze Your Own Codebase

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

Try Supermodel Free