Package io.grpc.servlet.jakarta
Class AsyncServletOutputStreamWriter.WriteState
- java.lang.Object
-
- io.grpc.servlet.jakarta.AsyncServletOutputStreamWriter.WriteState
-
- Enclosing class:
- AsyncServletOutputStreamWriter
private static final class AsyncServletOutputStreamWriter.WriteState extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static AsyncServletOutputStreamWriter.WriteState
DEFAULT
(package private) boolean
readyAndDrained
The servlet output stream is ready and the writeChain is empty.
-
Constructor Summary
Constructors Constructor Description WriteState(boolean readyAndDrained)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) AsyncServletOutputStreamWriter.WriteState
withReadyAndDrained(boolean readyAndDrained)
OnlyonWritePossible()
can set readyAndDrained to true, and onlyrunOrBuffer()
can set it to false.
-
-
-
Field Detail
-
DEFAULT
static final AsyncServletOutputStreamWriter.WriteState DEFAULT
-
readyAndDrained
final boolean readyAndDrained
The 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.
-
-
Method Detail
-
withReadyAndDrained
@CheckReturnValue AsyncServletOutputStreamWriter.WriteState withReadyAndDrained(boolean readyAndDrained)
OnlyonWritePossible()
can set readyAndDrained to true, and onlyrunOrBuffer()
can set it to false.
-
-