private static interface DefaultHttp2LocalFlowController.FlowState
Modifier and Type | Method and Description |
---|---|
boolean |
consumeBytes(int numBytes)
Indicates that the application has consumed
numBytes from the connection or stream and is
ready to receive more data. |
void |
endOfStream(boolean endOfStream) |
void |
incrementFlowControlWindows(int delta)
Increment the windows which are used to determine many bytes have been processed.
|
void |
incrementInitialStreamWindow(int delta)
Increment the initial window size for this stream.
|
int |
initialWindowSize() |
void |
receiveFlowControlledFrame(int dataLength)
A flow control event has occurred and we should decrement the amount of available bytes for this stream.
|
int |
unconsumedBytes() |
void |
window(int initialWindowSize) |
int |
windowSize() |
float |
windowUpdateRatio() |
void |
windowUpdateRatio(float ratio) |
boolean |
writeWindowUpdateIfNeeded()
Updates the flow control window for this stream if it is appropriate.
|
int windowSize()
int initialWindowSize()
void window(int initialWindowSize)
void incrementInitialStreamWindow(int delta)
delta
- The amount to increase the initial window size by.boolean writeWindowUpdateIfNeeded() throws Http2Exception
WINDOW_UPDATE
was written, false otherwise.Http2Exception
boolean consumeBytes(int numBytes) throws Http2Exception
numBytes
from the connection or stream and is
ready to receive more data.numBytes
- the number of bytes to be returned to the flow control window.WINDOW_UPDATE
was written, false otherwise.Http2Exception
int unconsumedBytes()
float windowUpdateRatio()
void windowUpdateRatio(float ratio)
void receiveFlowControlledFrame(int dataLength) throws Http2Exception
dataLength
- The amount of data to for which this stream is no longer eligible to use for flow control.Http2Exception
- If too much data is used relative to how much is available.void incrementFlowControlWindows(int delta) throws Http2Exception
delta
- The amount to increment the window by.Http2Exception
- if integer overflow occurs on the window.void endOfStream(boolean endOfStream)