## Uses of Interface
java.util.concurrent.Executor

- Packages that use Executor
  Package | Description
  --- | ---
  java.sql | Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language.
  java.util.concurrent | Utility classes commonly useful in concurrent programming.
  javax.management | Provides the core classes for the Java Management Extensions.
  javax.xml.ws | This package contains the core JAX-WS APIs.
  javax.xml.ws.spi | This package defines SPIs for JAX-WS.

- - ### Uses of Executor in java.sql

    Methods in java.sql with parameters of type Executor
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | Connection.`abort(Executor executor)` Terminates an open connection.
    `void` | Connection.`setNetworkTimeout(Executor executor, int milliseconds)` Sets the maximum period a `Connection` or objects created from the `Connection` will wait for the database to reply to any one request.

  - ### Uses of Executor in java.util.concurrent

    Subinterfaces of Executor in java.util.concurrent
    Modifier and Type | Interface | Description
    --- | --- | ---
    `interface` | `ExecutorService` An `Executor` that provides methods to manage termination and methods that can produce a `Future` for tracking progress of one or more asynchronous tasks.
    `interface` | `ScheduledExecutorService` An `ExecutorService` that can schedule commands to run after a given delay, or to execute periodically.

    Classes in java.util.concurrent that implement Executor
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `AbstractExecutorService` Provides default implementations of `ExecutorService` execution methods.
    `class` | `ForkJoinPool` An `ExecutorService` for running `ForkJoinTask`s.
    `class` | `ScheduledThreadPoolExecutor` A `ThreadPoolExecutor` that can additionally schedule commands to run after a given delay, or to execute periodically.
    `class` | `ThreadPoolExecutor` An `ExecutorService` that executes each submitted task using one of possibly several pooled threads, normally configured using `Executors` factory methods.

    Methods in java.util.concurrent with parameters of type Executor
    Modifier and Type | Method | Description
    --- | --- | ---
    `CompletionStage<Void>` | CompletionStage.`acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)` Returns a new CompletionStage that, when either this or the other given stage complete normally, is executed using the supplied executor, with the corresponding result as argument to the supplied function.
    `CompletableFuture<Void>` | CompletableFuture.`acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)`
    `<U> CompletionStage<U>` | CompletionStage.`applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor)` Returns a new CompletionStage that, when either this or the other given stage complete normally, is executed using the supplied executor, with the corresponding result as argument to the supplied function.
    `<U> CompletableFuture<U>` | CompletableFuture.`applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor)`
    `<U> CompletionStage<U>` | CompletionStage.`handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor)` Returns a new CompletionStage that, when this stage completes either normally or exceptionally, is executed using the supplied executor, with this stage's result and exception as arguments to the supplied function.
    `<U> CompletableFuture<U>` | CompletableFuture.`handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor)`
    `CompletionStage<Void>` | CompletionStage.`runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)` Returns a new CompletionStage that, when this and the other given stage complete normally, executes the given action using the supplied executor.
    `CompletableFuture<Void>` | CompletableFuture.`runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)`
    `CompletionStage<Void>` | CompletionStage.`runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)` Returns a new CompletionStage that, when either this or the other given stage complete normally, executes the given action using the supplied executor.
    `CompletableFuture<Void>` | CompletableFuture.`runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)`
    `static CompletableFuture<Void>` | CompletableFuture.`runAsync(Runnable runnable, Executor executor)` Returns a new CompletableFuture that is asynchronously completed by a task running in the given executor after it runs the given action.
    `static <U> CompletableFuture<U>` | CompletableFuture.`supplyAsync(Supplier<U> supplier, Executor executor)` Returns a new CompletableFuture that is asynchronously completed by a task running in the given executor with the value obtained by calling the given Supplier.
    `CompletionStage<Void>` | CompletionStage.`thenAcceptAsync(Consumer<? super T> action, Executor executor)` Returns a new CompletionStage that, when this stage completes normally, is executed using the supplied Executor, with this stage's result as the argument to the supplied action.
    `CompletableFuture<Void>` | CompletableFuture.`thenAcceptAsync(Consumer<? super T> action, Executor executor)`
    `<U> CompletionStage<Void>` | CompletionStage.`thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor)` Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using the supplied executor, with the two results as arguments to the supplied function.
    `<U> CompletableFuture<Void>` | CompletableFuture.`thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor)`
    `<U> CompletionStage<U>` | CompletionStage.`thenApplyAsync(Function<? super T,? extends U> fn, Executor executor)` Returns a new CompletionStage that, when this stage completes normally, is executed using the supplied Executor, with this stage's result as the argument to the supplied function.
    `<U> CompletableFuture<U>` | CompletableFuture.`thenApplyAsync(Function<? super T,? extends U> fn, Executor executor)`
    `<U,V> CompletionStage<V>` | CompletionStage.`thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor)` Returns a new CompletionStage that, when this and the other given stage complete normally, is executed using the supplied executor, with the two results as arguments to the supplied function.
    `<U,V> CompletableFuture<V>` | CompletableFuture.`thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor)`
    `<U> CompletionStage<U>` | CompletionStage.`thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor)` Returns a new CompletionStage that, when this stage completes normally, is executed using the supplied Executor, with this stage's result as the argument to the supplied function.
    `<U> CompletableFuture<U>` | CompletableFuture.`thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor)`
    `CompletionStage<Void>` | CompletionStage.`thenRunAsync(Runnable action, Executor executor)` Returns a new CompletionStage that, when this stage completes normally, executes the given action using the supplied Executor.
    `CompletableFuture<Void>` | CompletableFuture.`thenRunAsync(Runnable action, Executor executor)`
    `CompletionStage<T>` | CompletionStage.`whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor)` Returns a new CompletionStage with the same result or exception as this stage, that executes the given action using the supplied Executor when this stage completes.
    `CompletableFuture<T>` | CompletableFuture.`whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor)`

    Constructors in java.util.concurrent with parameters of type Executor
    Constructor | Description
    --- | ---
    `ExecutorCompletionService(Executor executor)` Creates an ExecutorCompletionService using the supplied executor for base task execution and a `LinkedBlockingQueue` as a completion queue.
    `ExecutorCompletionService(Executor executor, BlockingQueue<Future<V>> completionQueue)` Creates an ExecutorCompletionService using the supplied executor for base task execution and the supplied queue as its completion queue.

  - ### Uses of Executor in javax.management

    Constructors in javax.management with parameters of type Executor
    Constructor | Description
    --- | ---
    `NotificationBroadcasterSupport(Executor executor)` Constructs a NotificationBroadcasterSupport where each listener is invoked using the given `Executor`.
    `NotificationBroadcasterSupport(Executor executor, MBeanNotificationInfo... info)` Constructs a NotificationBroadcasterSupport with information about the notifications that may be sent, and where each listener is invoked using the given `Executor`.

  - ### Uses of Executor in javax.xml.ws

    Methods in javax.xml.ws that return Executor
    Modifier and Type | Method | Description
    --- | --- | ---
    `Executor` | Service.`getExecutor()` Returns the executor for this `Service`instance.
    `abstract Executor` | Endpoint.`getExecutor()` Returns the executor for this `Endpoint`instance.

    Methods in javax.xml.ws with parameters of type Executor
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | Service.`setExecutor(Executor executor)` Sets the executor for this `Service` instance.
    `abstract void` | Endpoint.`setExecutor(Executor executor)` Sets the executor for this `Endpoint` instance.

  - ### Uses of Executor in javax.xml.ws.spi

    Methods in javax.xml.ws.spi that return Executor
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract Executor` | ServiceDelegate.`getExecutor()` Returns the executor for this `Service`instance.

    Methods in javax.xml.ws.spi with parameters of type Executor
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract void` | ServiceDelegate.`setExecutor(Executor executor)` Sets the executor for this `Service` instance.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.