Class DefaultHttp2RemoteFlowController.WritabilityMonitor

    • Field Detail

      • inWritePendingBytes

        private boolean inWritePendingBytes
      • totalPendingBytes

        private long totalPendingBytes
    • Constructor Detail

      • WritabilityMonitor

        private WritabilityMonitor()
    • Method Detail

      • write

        public final void write​(Http2Stream stream,
                                int numBytes)
        Description copied from interface: StreamByteDistributor.Writer
        Writes the allocated bytes for this stream.

        Any Throwable thrown from this method is considered a programming error. A GOAWAY frame will be sent and the will be connection closed.

        Specified by:
        write in interface StreamByteDistributor.Writer
        Parameters:
        stream - the stream for which to perform the write.
        numBytes - the number of bytes to write.
      • channelWritabilityChange

        void channelWritabilityChange()
                               throws Http2Exception
        Called when the writability of the underlying channel changes.
        Throws:
        Http2Exception - If a write occurs and an exception happens in the write operation.
      • windowSize

        void windowSize​(DefaultHttp2RemoteFlowController.FlowState state,
                        int initialWindowSize)
        Set the initial window size for state.
        Parameters:
        state - the state to change the initial window size for.
        initialWindowSize - the size of the window in bytes.
      • incrementWindowSize

        void incrementWindowSize​(DefaultHttp2RemoteFlowController.FlowState state,
                                 int delta)
                          throws Http2Exception
        Increment the window size for a particular stream.
        Parameters:
        state - the state associated with the stream whose window is being incremented.
        delta - The amount to increment by.
        Throws:
        Http2Exception - If this operation overflows the window for state.
      • incrementPendingBytes

        final void incrementPendingBytes​(int delta)
        Increment the total amount of pending bytes for all streams. When any stream's pending bytes changes method should be called.
        Parameters:
        delta - The amount to increment by.
      • isWritableConnection

        final boolean isWritableConnection()