Home / Function/ closeWithNoPrioritizableDependentsShouldRestructureTree() — netty Function Reference

closeWithNoPrioritizableDependentsShouldRestructureTree() — netty Function Reference

Architecture documentation for the closeWithNoPrioritizableDependentsShouldRestructureTree() function in WeightedFairQueueByteDistributorDependencyTreeTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c5925e95_58c7_10a5_390d_b9199e563930["closeWithNoPrioritizableDependentsShouldRestructureTree()"]
  f59fdba5_c411_919e_8d09_ef11c6679e0d["WeightedFairQueueByteDistributorDependencyTreeTest"]
  c5925e95_58c7_10a5_390d_b9199e563930 -->|defined in| f59fdba5_c411_919e_8d09_ef11c6679e0d
  style c5925e95_58c7_10a5_390d_b9199e563930 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributorDependencyTreeTest.java lines 689–719

    @Test
    public void closeWithNoPrioritizableDependentsShouldRestructureTree() throws Exception {
        Http2Stream streamA = connection.local().createStream(1, false);
        Http2Stream streamB = connection.local().createStream(3, false);
        Http2Stream streamC = connection.local().createStream(5, false);
        Http2Stream streamD = connection.local().createStream(7, false);
        Http2Stream streamE = connection.local().createStream(9, false);
        Http2Stream streamF = connection.local().createStream(11, false);

        setPriority(streamB.id(), streamA.id(), DEFAULT_PRIORITY_WEIGHT, false);
        setPriority(streamC.id(), streamB.id(), DEFAULT_PRIORITY_WEIGHT, false);
        setPriority(streamD.id(), streamB.id(), DEFAULT_PRIORITY_WEIGHT, false);
        setPriority(streamE.id(), streamC.id(), DEFAULT_PRIORITY_WEIGHT, false);
        setPriority(streamF.id(), streamD.id(), DEFAULT_PRIORITY_WEIGHT, false);

        // Close internal nodes, leave 1 leaf node open, the only remaining stream is the one that is not closed (E).
        streamA.close();
        // Closing streamB will distribute its weight to the children (C & D) equally.
        streamB.close();
        streamC.close();
        streamD.close();
        streamF.close();

        // Level 0
        assertEquals(1, distributor.numChildren(connection.connectionStream().id()));

        // Level 1
        short halfWeight = DEFAULT_PRIORITY_WEIGHT / 2;
        assertTrue(distributor.isChild(streamE.id(), connection.connectionStream().id(), halfWeight));
        assertEquals(0, distributor.numChildren(streamE.id()));
    }

Domain

Subdomains

Frequently Asked Questions

What does closeWithNoPrioritizableDependentsShouldRestructureTree() do?
closeWithNoPrioritizableDependentsShouldRestructureTree() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributorDependencyTreeTest.java.
Where is closeWithNoPrioritizableDependentsShouldRestructureTree() defined?
closeWithNoPrioritizableDependentsShouldRestructureTree() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributorDependencyTreeTest.java at line 689.

Analyze Your Own Codebase

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

Try Supermodel Free