Home / Type/ FlowState Type — netty Architecture

FlowState Type — netty Architecture

Architecture documentation for the FlowState type/interface in DefaultHttp2LocalFlowController.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  12c387f6_fe2b_5bec_80c8_8979ccc4c2f6["FlowState"]
  40872612_d507_c116_2a45_f6a7304d70c3["DefaultHttp2LocalFlowController.java"]
  12c387f6_fe2b_5bec_80c8_8979ccc4c2f6 -->|defined in| 40872612_d507_c116_2a45_f6a7304d70c3
  style 12c387f6_fe2b_5bec_80c8_8979ccc4c2f6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2LocalFlowController.java lines 559–611

    private interface FlowState {

        int windowSize();

        int initialWindowSize();

        void window(int initialWindowSize);

        /**
         * Increment the initial window size for this stream.
         * @param delta The amount to increase the initial window size by.
         */
        void incrementInitialStreamWindow(int delta);

        /**
         * Updates the flow control window for this stream if it is appropriate.
         *
         * @return true if {@code WINDOW_UPDATE} was written, false otherwise.
         */
        boolean writeWindowUpdateIfNeeded() throws Http2Exception;

        /**
         * Indicates that the application has consumed {@code numBytes} from the connection or stream and is
         * ready to receive more data.
         *
         * @param numBytes the number of bytes to be returned to the flow control window.
         * @return true if {@code WINDOW_UPDATE} was written, false otherwise.
         * @throws Http2Exception
         */
        boolean consumeBytes(int numBytes) throws Http2Exception;

        int unconsumedBytes();

        float windowUpdateRatio();

        void windowUpdateRatio(float ratio);

        /**
         * A flow control event has occurred and we should decrement the amount of available bytes for this stream.
         * @param dataLength The amount of data to for which this stream is no longer eligible to use for flow control.
         * @throws Http2Exception If too much data is used relative to how much is available.
         */
        void receiveFlowControlledFrame(int dataLength) throws Http2Exception;

        /**
         * Increment the windows which are used to determine many bytes have been processed.
         * @param delta The amount to increment the window by.
         * @throws Http2Exception if integer overflow occurs on the window.
         */
        void incrementFlowControlWindows(int delta) throws Http2Exception;

        void endOfStream(boolean endOfStream);
    }

Frequently Asked Questions

What is the FlowState type?
FlowState is a type/interface in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2LocalFlowController.java.
Where is FlowState defined?
FlowState is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2LocalFlowController.java at line 559.

Analyze Your Own Codebase

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

Try Supermodel Free