private class DefaultHttp2RemoteFlowController.WritabilityMonitor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
inWritePendingBytes |
private long |
totalPendingBytes |
private StreamByteDistributor.Writer |
writer |
Modifier | Constructor and Description |
---|---|
private |
WritabilityMonitor() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
channelWritabilityChange()
Called when the writability of the underlying channel changes.
|
(package private) void |
enqueueFrame(DefaultHttp2RemoteFlowController.FlowState state,
Http2RemoteFlowController.FlowControlled frame)
Add a frame to be sent via flow control.
|
(package private) void |
incrementPendingBytes(int delta)
Increment the total amount of pending bytes for all streams.
|
(package private) void |
incrementWindowSize(DefaultHttp2RemoteFlowController.FlowState state,
int delta)
Increment the window size for a particular stream.
|
(package private) void |
initialWindowSize(int newWindowSize) |
(package private) boolean |
isWritable(DefaultHttp2RemoteFlowController.FlowState state)
Determine if the stream associated with
state is writable. |
(package private) boolean |
isWritableConnection() |
(package private) void |
stateCancelled(DefaultHttp2RemoteFlowController.FlowState state)
Called when the state is cancelled.
|
(package private) void |
windowSize(DefaultHttp2RemoteFlowController.FlowState state,
int initialWindowSize)
Set the initial window size for
state . |
(package private) void |
writePendingBytes() |
private boolean inWritePendingBytes
private long totalPendingBytes
private final StreamByteDistributor.Writer writer
void channelWritabilityChange() throws Http2Exception
Http2Exception
- If a write occurs and an exception happens in the write operation.void stateCancelled(DefaultHttp2RemoteFlowController.FlowState state)
state
- the state that was cancelled.void windowSize(DefaultHttp2RemoteFlowController.FlowState state, int initialWindowSize)
state
.state
- the state to change the initial window size for.initialWindowSize
- the size of the window in bytes.void incrementWindowSize(DefaultHttp2RemoteFlowController.FlowState state, int delta) throws Http2Exception
state
- the state associated with the stream whose window is being incremented.delta
- The amount to increment by.Http2Exception
- If this operation overflows the window for state
.void enqueueFrame(DefaultHttp2RemoteFlowController.FlowState state, Http2RemoteFlowController.FlowControlled frame) throws Http2Exception
state
- The state associated with the stream which the frame
is associated with.frame
- the frame to enqueue.Http2Exception
- If a writability error occurs.final void incrementPendingBytes(int delta)
delta
- The amount to increment by.final boolean isWritable(DefaultHttp2RemoteFlowController.FlowState state)
state
is writable.state
- The state which is associated with the stream to test writability for.true
if DefaultHttp2RemoteFlowController.FlowState.stream()
is writable. false
otherwise.final void writePendingBytes() throws Http2Exception
Http2Exception
void initialWindowSize(int newWindowSize) throws Http2Exception
Http2Exception
final boolean isWritableConnection()