Class SocketWrapperBase.OperationState<A>
java.lang.Object
org.apache.tomcat.util.net.SocketWrapperBase.OperationState<A>
- All Implemented Interfaces:
Runnable
- Enclosing class:
SocketWrapperBase<E>
Internal state tracker for vectored operations.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final A
protected final SocketWrapperBase.BlockingMode
protected final ByteBuffer[]
protected final AtomicBoolean
protected final SocketWrapperBase.CompletionCheck
protected final SocketWrapperBase<E>.VectoredIOCompletionHandler
<A> protected boolean
protected final CompletionHandler
<Long, ? super A> protected final int
protected long
protected final int
protected final boolean
protected final Semaphore
protected SocketWrapperBase.CompletionState
protected final long
protected final TimeUnit
-
Constructor Summary
ModifierConstructorDescriptionprotected
OperationState
(boolean read, ByteBuffer[] buffers, int offset, int length, SocketWrapperBase.BlockingMode block, long timeout, TimeUnit unit, A attachment, SocketWrapperBase.CompletionCheck check, CompletionHandler<Long, ? super A> handler, Semaphore semaphore, SocketWrapperBase<E>.VectoredIOCompletionHandler<A> completion) -
Method Summary
-
Field Details
-
read
protected final boolean read -
buffers
-
offset
protected final int offset -
length
protected final int length -
attachment
-
timeout
protected final long timeout -
unit
-
block
-
check
-
handler
-
semaphore
-
completion
-
callHandler
-
nBytes
protected volatile long nBytes -
state
-
completionDone
protected boolean completionDone
-
-
Constructor Details
-
OperationState
protected OperationState(boolean read, ByteBuffer[] buffers, int offset, int length, SocketWrapperBase.BlockingMode block, long timeout, TimeUnit unit, A attachment, SocketWrapperBase.CompletionCheck check, CompletionHandler<Long, ? super A> handler, Semaphore semaphore, SocketWrapperBase<E>.VectoredIOCompletionHandler<A> completion)
-
-
Method Details
-
isInline
protected abstract boolean isInline()- Returns:
- true if the operation is still inline, false if the operation is running on a thread that is not the original caller
-
hasOutboundRemaining
protected boolean hasOutboundRemaining() -
process
protected boolean process()Process the operation using the connector executor.- Returns:
- true if the operation was accepted, false if the executor rejected execution
-
start
protected void start()Start the operation, this will typically call run. -
end
protected void end()End the operation.
-