Home / Function/ activeCountChangeForTree() — netty Function Reference

activeCountChangeForTree() — netty Function Reference

Architecture documentation for the activeCountChangeForTree() function in WeightedFairQueueByteDistributor.java from the netty codebase.

Function java Buffer Allocators calls 3 called by 3

Entity Profile

Dependency Diagram

graph TD
  4ff2400b_5ed4_4092_bc1a_dfee981e6cf7["activeCountChangeForTree()"]
  7bb99c84_0884_e59e_f284_a7da408d2406["State"]
  4ff2400b_5ed4_4092_bc1a_dfee981e6cf7 -->|defined in| 7bb99c84_0884_e59e_f284_a7da408d2406
  25f3d9c7_29c4_05d1_8c21_d15e89a37789["notifyParentChanged()"]
  25f3d9c7_29c4_05d1_8c21_d15e89a37789 -->|calls| 4ff2400b_5ed4_4092_bc1a_dfee981e6cf7
  0bfeea84_edf2_a350_f986_e4dde4dc5152["setParent()"]
  0bfeea84_edf2_a350_f986_e4dde4dc5152 -->|calls| 4ff2400b_5ed4_4092_bc1a_dfee981e6cf7
  3042fea5_9611_a8ff_248e_a67b1cffbc63["updateStreamableBytes()"]
  3042fea5_9611_a8ff_248e_a67b1cffbc63 -->|calls| 4ff2400b_5ed4_4092_bc1a_dfee981e6cf7
  ccd9546d_2136_440a_df2f_40cc407cd5f7["removePseudoTimeQueue()"]
  4ff2400b_5ed4_4092_bc1a_dfee981e6cf7 -->|calls| ccd9546d_2136_440a_df2f_40cc407cd5f7
  d451dd4d_b97d_4f9d_beb3_1c921735b96e["isDistributing()"]
  4ff2400b_5ed4_4092_bc1a_dfee981e6cf7 -->|calls| d451dd4d_b97d_4f9d_beb3_1c921735b96e
  4d34df41_0061_89d6_3f84_4a8afe97e5f2["offerAndInitializePseudoTime()"]
  4ff2400b_5ed4_4092_bc1a_dfee981e6cf7 -->|calls| 4d34df41_0061_89d6_3f84_4a8afe97e5f2
  style 4ff2400b_5ed4_4092_bc1a_dfee981e6cf7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributor.java lines 615–639

        void activeCountChangeForTree(int increment) {
            assert activeCountForTree + increment >= 0;
            activeCountForTree += increment;
            if (parent != null) {
                assert activeCountForTree != increment ||
                       pseudoTimeQueueIndex == INDEX_NOT_IN_QUEUE ||
                       parent.pseudoTimeQueue.containsTyped(this) :
                     "State[" + streamId + "].activeCountForTree changed from 0 to " + increment + " is in a " +
                     "pseudoTimeQueue, but not in parent[ " + parent.streamId + "]'s pseudoTimeQueue";
                if (activeCountForTree == 0) {
                    parent.removePseudoTimeQueue(this);
                } else if (activeCountForTree == increment && !isDistributing()) {
                    // If frame count was 0 but is now not, and this node is not already in a pseudoTimeQueue (assumed
                    // to be pState's pseudoTimeQueue) then enqueue it. If this State object is being processed the
                    // pseudoTime for this node should not be adjusted, and the node will be added back to the
                    // pseudoTimeQueue/tree structure after it is done being processed. This may happen if the
                    // activeCountForTree == 0 (a node which can't stream anything and is blocked) is at/near root of
                    // the tree, and is popped off the pseudoTimeQueue during processing, and then put back on the
                    // pseudoTimeQueue because a child changes position in the priority tree (or is closed because it is
                    // not blocked and finished writing all data).
                    parent.offerAndInitializePseudoTime(this);
                }
                parent.activeCountChangeForTree(increment);
            }
        }

Domain

Subdomains

Frequently Asked Questions

What does activeCountChangeForTree() do?
activeCountChangeForTree() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributor.java.
Where is activeCountChangeForTree() defined?
activeCountChangeForTree() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributor.java at line 615.
What does activeCountChangeForTree() call?
activeCountChangeForTree() calls 3 function(s): isDistributing, offerAndInitializePseudoTime, removePseudoTimeQueue.
What calls activeCountChangeForTree()?
activeCountChangeForTree() is called by 3 function(s): notifyParentChanged, setParent, updateStreamableBytes.

Analyze Your Own Codebase

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

Try Supermodel Free