Executor (Apache Tomcat 8.5.87 API Documentation)

Package org.apache.catalina

## Interface Executor

- All Superinterfaces:
    `java.util.concurrent.Executor`, `Lifecycle`
  All Known Implementing Classes:
    `StandardThreadExecutor`

      public interface Executor
      extends java.util.concurrent.Executor, Lifecycle

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.catalina.Lifecycle

      `Lifecycle.SingleUse`

  - ### Field Summary

    - ### Fields inherited from interface org.apache.catalina.Lifecycle

      `AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `execute​(java.lang.Runnable command, long timeout, java.util.concurrent.TimeUnit unit)` | Deprecated. Unused.
    `java.lang.String` | `getName()` |

    - ### Methods inherited from interface java.util.concurrent.Executor

      `execute`

    - ### Methods inherited from interface org.apache.catalina.Lifecycle

      `addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop`

- - ### Method Detail

    - #### getName

          java.lang.String getName()

    - #### execute

          @Deprecated
          void execute​(java.lang.Runnable command,
                       long timeout,
                       java.util.concurrent.TimeUnit unit)

      Deprecated.
      Unused. Will be removed in Tomcat 10.1.x onwards.
      Executes the given command at some time in the future. The command may execute in a new thread, in a pooled thread, or in the calling thread, at the discretion of the `Executor` implementation. If no threads are available, it will be added to the work queue. If the work queue is full, the system will wait for the specified time until it throws a RejectedExecutionException
      Parameters:
        `command` - the runnable task
        `timeout` - the length of time to wait for the task to complete
        `unit` - the units in which timeout is expressed
      Throws:
        `java.util.concurrent.RejectedExecutionException` - if this task cannot be accepted for execution - the queue is full
        `java.lang.NullPointerException` - if command or unit is null