Home / Function/ removeChild() — netty Function Reference

removeChild() — netty Function Reference

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

Function java Buffer Allocators calls 5 called by 2

Entity Profile

Dependency Diagram

graph TD
  a7426564_13ec_4caa_ec35_83d94c9ad9d0["removeChild()"]
  7bb99c84_0884_e59e_f284_a7da408d2406["State"]
  a7426564_13ec_4caa_ec35_83d94c9ad9d0 -->|defined in| 7bb99c84_0884_e59e_f284_a7da408d2406
  0f84cad1_72bf_48c4_a975_f58d297dd3c2["WeightedFairQueueByteDistributor()"]
  0f84cad1_72bf_48c4_a975_f58d297dd3c2 -->|calls| a7426564_13ec_4caa_ec35_83d94c9ad9d0
  ebb4ce48_a19b_1763_6677_772bd73eafff["updateDependencyTree()"]
  ebb4ce48_a19b_1763_6677_772bd73eafff -->|calls| a7426564_13ec_4caa_ec35_83d94c9ad9d0
  e0127c29_fcc1_4949_a31f_37cf0c8571cf["ParentChangedEvent()"]
  a7426564_13ec_4caa_ec35_83d94c9ad9d0 -->|calls| e0127c29_fcc1_4949_a31f_37cf0c8571cf
  0bfeea84_edf2_a350_f986_e4dde4dc5152["setParent()"]
  a7426564_13ec_4caa_ec35_83d94c9ad9d0 -->|calls| 0bfeea84_edf2_a350_f986_e4dde4dc5152
  1fffb7e5_18e2_6d2d_5034_f6b396e3925d["getTotalWeight()"]
  a7426564_13ec_4caa_ec35_83d94c9ad9d0 -->|calls| 1fffb7e5_18e2_6d2d_5034_f6b396e3925d
  fb17eda3_f88a_c99f_e79c_e7e5ccb06a40["takeChild()"]
  a7426564_13ec_4caa_ec35_83d94c9ad9d0 -->|calls| fb17eda3_f88a_c99f_e79c_e7e5ccb06a40
  25f3d9c7_29c4_05d1_8c21_d15e89a37789["notifyParentChanged()"]
  a7426564_13ec_4caa_ec35_83d94c9ad9d0 -->|calls| 25f3d9c7_29c4_05d1_8c21_d15e89a37789
  style a7426564_13ec_4caa_ec35_83d94c9ad9d0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributor.java lines 538–558

        void removeChild(State child) {
            if (children.remove(child.streamId) != null) {
                List<ParentChangedEvent> events = new ArrayList<ParentChangedEvent>(1 + child.children.size());
                events.add(new ParentChangedEvent(child, child.parent));
                child.setParent(null);

                if (!child.children.isEmpty()) {
                    // Move up any grand children to be directly dependent on this node.
                    Iterator<IntObjectMap.PrimitiveEntry<State>> itr = child.children.entries().iterator();
                    long totalWeight = child.getTotalWeight();
                    do {
                        // Redistribute the weight of child to its dependency proportionally.
                        State dependency = itr.next().value();
                        dependency.weight = (short) max(1, dependency.weight * child.weight / totalWeight);
                        takeChild(itr, dependency, false, events);
                    } while (itr.hasNext());
                }

                notifyParentChanged(events);
            }
        }

Domain

Subdomains

Frequently Asked Questions

What does removeChild() do?
removeChild() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributor.java.
Where is removeChild() defined?
removeChild() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributor.java at line 538.
What does removeChild() call?
removeChild() calls 5 function(s): ParentChangedEvent, getTotalWeight, notifyParentChanged, setParent, takeChild.
What calls removeChild()?
removeChild() is called by 2 function(s): WeightedFairQueueByteDistributor, updateDependencyTree.

Analyze Your Own Codebase

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

Try Supermodel Free