SocketWrapperBase.OperationState (Apache Tomcat 10.1.48 API Documentation)
Description: declaration: package: org.apache.tomcat.util.net, class: SocketWrapperBase, class: OperationState

# Class SocketWrapperBase.OperationState<A>

java.lang.Object
org.apache.tomcat.util.net.SocketWrapperBase.OperationState<A>

All Implemented Interfaces:
  `Runnable`

Enclosing class:
  `SocketWrapperBase<E>`

protected abstract class SocketWrapperBase.OperationState<A> extends Object implements Runnable
Internal state tracker for vectored operations.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final A`
  `attachment`
  `protected final SocketWrapperBase.BlockingMode`
  `block`
  `protected final ByteBuffer[]`
  `buffers`
  `protected final AtomicBoolean`
  `callHandler`
  `protected final SocketWrapperBase.CompletionCheck`
  `check`
  `protected final SocketWrapperBase<E>.VectoredIOCompletionHandler<A>`
  `completion`
  `protected boolean`
  `completionDone`
  `protected final CompletionHandler<Long, ? super A>`
  `handler`
  `protected final int`
  `length`
  `protected long`
  `nBytes`
  `protected final int`
  `offset`
  `protected final boolean`
  `read`
  `protected final Semaphore`
  `semaphore`
  `protected SocketWrapperBase.CompletionState`
  `state`
  `protected final long`
  `timeout`
  `protected final TimeUnit`
  `unit`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `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 Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `end()`
  End the operation.
  `protected boolean`
  `hasOutboundRemaining()`
  `protected abstract boolean`
  `isInline()`
  `protected boolean`
  `process()`
  Process the operation using the connector executor.
  `protected void`
  `start()`
  Start the operation, this will typically call run.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface Runnable

  `run`

- ## Field Details

  - ### read

    protected final boolean read

  - ### buffers

    protected final ByteBuffer[] buffers

  - ### offset

    protected final int offset

  - ### length

    protected final int length

  - ### attachment

    protected final A attachment

  - ### timeout

    protected final long timeout

  - ### unit

    protected final TimeUnit unit

  - ### block

    protected final SocketWrapperBase.BlockingMode block

  - ### check

    protected final SocketWrapperBase.CompletionCheck check

  - ### handler

    protected final CompletionHandler<Long, ? super A> handler

  - ### semaphore

    protected final Semaphore semaphore

  - ### completion

    protected final SocketWrapperBase<E>.VectoredIOCompletionHandler<A> completion

  - ### callHandler

    protected final AtomicBoolean callHandler

  - ### nBytes

    protected volatile long nBytes

  - ### state

    protected volatile SocketWrapperBase.CompletionState 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.