Home / Function/ removeWithPrioritizableDependentsShouldNotRestructureTree() — netty Function Reference

removeWithPrioritizableDependentsShouldNotRestructureTree() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributorDependencyTreeTest.java lines 658–687

    @Test
    public void removeWithPrioritizableDependentsShouldNotRestructureTree() 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);

        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);

        // Default removal policy will cause it to be removed immediately.
        // Closing streamB will distribute its weight to the children (C & D) equally.
        streamB.close();

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

        // Level 1
        assertTrue(distributor.isChild(streamA.id(), connection.connectionStream().id(), DEFAULT_PRIORITY_WEIGHT));
        assertEquals(2, distributor.numChildren(streamA.id()));

        // Level 2
        short halfWeight = DEFAULT_PRIORITY_WEIGHT / 2;
        assertTrue(distributor.isChild(streamC.id(), streamA.id(), halfWeight));
        assertEquals(0, distributor.numChildren(streamC.id()));

        assertTrue(distributor.isChild(streamD.id(), streamA.id(), halfWeight));
        assertEquals(0, distributor.numChildren(streamD.id()));
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free