Home / Function/ windowUpdateAndFlushShouldTriggerWrite() — netty Function Reference

windowUpdateAndFlushShouldTriggerWrite() — netty Function Reference

Architecture documentation for the windowUpdateAndFlushShouldTriggerWrite() function in DefaultHttp2RemoteFlowControllerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  2aae32fe_f478_4db5_efb6_e195ae461e31["windowUpdateAndFlushShouldTriggerWrite()"]
  f8fd7697_92d4_6455_4dd8_09a33ac81a6f["DefaultHttp2RemoteFlowControllerTest"]
  2aae32fe_f478_4db5_efb6_e195ae461e31 -->|defined in| f8fd7697_92d4_6455_4dd8_09a33ac81a6f
  136071dd_c92e_5482_7cb2_c1ba0769c1ab["FakeFlowControlled()"]
  2aae32fe_f478_4db5_efb6_e195ae461e31 -->|calls| 136071dd_c92e_5482_7cb2_c1ba0769c1ab
  85ffafbd_47aa_f4f5_fd02_71f26d692e10["sendData()"]
  2aae32fe_f478_4db5_efb6_e195ae461e31 -->|calls| 85ffafbd_47aa_f4f5_fd02_71f26d692e10
  d7bb96bf_47aa_9ae7_f5a1_7aaad102fb27["assertPartiallyWritten()"]
  2aae32fe_f478_4db5_efb6_e195ae461e31 -->|calls| d7bb96bf_47aa_9ae7_f5a1_7aaad102fb27
  4d627b61_f0ea_0927_043f_7bfb246d71d1["assertNotWritten()"]
  2aae32fe_f478_4db5_efb6_e195ae461e31 -->|calls| 4d627b61_f0ea_0927_043f_7bfb246d71d1
  2cd55558_d3f6_0fff_ea2b_3cf72da93d07["resetCtx()"]
  2aae32fe_f478_4db5_efb6_e195ae461e31 -->|calls| 2cd55558_d3f6_0fff_ea2b_3cf72da93d07
  947caffb_54ef_9984_108e_69119ef018d1["incrementWindowSize()"]
  2aae32fe_f478_4db5_efb6_e195ae461e31 -->|calls| 947caffb_54ef_9984_108e_69119ef018d1
  da0712d5_2b96_e340_6c7a_17114adb9efc["assertFullyWritten()"]
  2aae32fe_f478_4db5_efb6_e195ae461e31 -->|calls| da0712d5_2b96_e340_6c7a_17114adb9efc
  72f6527f_6737_5bc4_f643_b308fe4de273["window()"]
  2aae32fe_f478_4db5_efb6_e195ae461e31 -->|calls| 72f6527f_6737_5bc4_f643_b308fe4de273
  style 2aae32fe_f478_4db5_efb6_e195ae461e31 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java lines 283–319

    @Test
    public void windowUpdateAndFlushShouldTriggerWrite() throws Http2Exception {
        controller.initialWindowSize(10);
        verify(listener, never()).writabilityChanged(stream(STREAM_A));
        assertTrue(controller.isWritable(stream(STREAM_A)));

        FakeFlowControlled data = new FakeFlowControlled(20);
        FakeFlowControlled moreData = new FakeFlowControlled(10);
        sendData(STREAM_A, data);
        sendData(STREAM_A, moreData);
        controller.writePendingBytes();
        data.assertPartiallyWritten(10);
        moreData.assertNotWritten();
        verify(listener, times(1)).writabilityChanged(stream(STREAM_A));
        assertFalse(controller.isWritable(stream(STREAM_A)));
        reset(listener);
        resetCtx();

        // Update the window and verify that the rest of data and some of moreData are written
        incrementWindowSize(STREAM_A, 15);
        verify(listener, never()).writabilityChanged(stream(STREAM_A));
        assertFalse(controller.isWritable(stream(STREAM_A)));
        reset(listener);

        controller.writePendingBytes();

        data.assertFullyWritten();
        moreData.assertPartiallyWritten(5);
        verify(listener, never()).writabilityChanged(stream(STREAM_A));
        assertFalse(controller.isWritable(stream(STREAM_A)));

        assertEquals(DEFAULT_WINDOW_SIZE - 25, window(CONNECTION_STREAM_ID));
        assertEquals(0, window(STREAM_A));
        assertEquals(10, window(STREAM_B));
        assertEquals(10, window(STREAM_C));
        assertEquals(10, window(STREAM_D));
    }

Domain

Subdomains

Frequently Asked Questions

What does windowUpdateAndFlushShouldTriggerWrite() do?
windowUpdateAndFlushShouldTriggerWrite() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java.
Where is windowUpdateAndFlushShouldTriggerWrite() defined?
windowUpdateAndFlushShouldTriggerWrite() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java at line 283.
What does windowUpdateAndFlushShouldTriggerWrite() call?
windowUpdateAndFlushShouldTriggerWrite() calls 8 function(s): FakeFlowControlled, assertFullyWritten, assertNotWritten, assertPartiallyWritten, incrementWindowSize, resetCtx, sendData, window.

Analyze Your Own Codebase

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

Try Supermodel Free