Package io.grpc.servlet
Class AsyncServletOutputStreamWriter.WriteState
java.lang.Object
io.grpc.servlet.AsyncServletOutputStreamWriter.WriteState
- Enclosing class:
AsyncServletOutputStreamWriter
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final AsyncServletOutputStreamWriter.WriteState
(package private) final boolean
The servlet output stream is ready and the writeChain is empty. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) AsyncServletOutputStreamWriter.WriteState
withReadyAndDrained
(boolean readyAndDrained) OnlyonWritePossible()
can set readyAndDrained to true, and onlyrunOrBuffer()
can set it to false.
-
Field Details
-
DEFAULT
-
readyAndDrained
final boolean readyAndDrainedThe servlet output stream is ready and the writeChain is empty.readyAndDrained turns from false to true when:
onWritePossible()
exits while currently there is no more data to write, but the last check ofServletOutputStream.isReady()
is true.readyAndDrained turns from true to false when:
runOrBuffer()
exits while either the action item is written directly to the servlet output stream and the check ofServletOutputStream.isReady()
right after that returns false, or the action item is buffered into the writeChain.
-
-
Constructor Details
-
WriteState
WriteState(boolean readyAndDrained)
-
-
Method Details
-
withReadyAndDrained
@CheckReturnValue AsyncServletOutputStreamWriter.WriteState withReadyAndDrained(boolean readyAndDrained) OnlyonWritePossible()
can set readyAndDrained to true, and onlyrunOrBuffer()
can set it to false.
-