| Package | Description | 
|---|---|
| java.util.concurrent | Utility classes commonly useful in concurrent programming. | 
| javax.tools | Provides interfaces for tools which can be invoked from a program,
 for example, compilers. | 
| Modifier and Type | Method and Description | 
|---|---|
| static Callable<Object> | Executors. callable(PrivilegedAction<?> action)Returns a  Callableobject that, when
 called, runs the given privileged action and returns its result. | 
| static Callable<Object> | Executors. callable(PrivilegedExceptionAction<?> action)Returns a  Callableobject that, when
 called, runs the given privileged exception action and returns
 its result. | 
| static Callable<Object> | Executors. callable(Runnable task)Returns a  Callableobject that, when
 called, runs the given task and returnsnull. | 
| static <T> Callable<T> | Executors. callable(Runnable task,
        T result)Returns a  Callableobject that, when
 called, runs the given task and returns the given result. | 
| static <T> Callable<T> | Executors. privilegedCallable(Callable<T> callable)Returns a  Callableobject that will, when called,
 execute the givencallableunder the current access
 control context. | 
| static <T> Callable<T> | Executors. privilegedCallableUsingCurrentClassLoader(Callable<T> callable)Returns a  Callableobject that will, when called,
 execute the givencallableunder the current access
 control context, with the current context class loader as the
 context class loader. | 
| Modifier and Type | Method and Description | 
|---|---|
| static <T> ForkJoinTask<T> | ForkJoinTask. adapt(Callable<? extends T> callable)Returns a new  ForkJoinTaskthat performs thecallmethod of the givenCallableas its action, and returns
 its result uponForkJoinTask.join(), translating any checked exceptions
 encountered intoRuntimeException. | 
| protected <V> RunnableScheduledFuture<V> | ScheduledThreadPoolExecutor. decorateTask(Callable<V> callable,
            RunnableScheduledFuture<V> task)Modifies or replaces the task used to execute a callable. | 
| protected <T> RunnableFuture<T> | AbstractExecutorService. newTaskFor(Callable<T> callable)Returns a  RunnableFuturefor the given callable task. | 
| protected <T> RunnableFuture<T> | ForkJoinPool. newTaskFor(Callable<T> callable) | 
| static <T> Callable<T> | Executors. privilegedCallable(Callable<T> callable)Returns a  Callableobject that will, when called,
 execute the givencallableunder the current access
 control context. | 
| static <T> Callable<T> | Executors. privilegedCallableUsingCurrentClassLoader(Callable<T> callable)Returns a  Callableobject that will, when called,
 execute the givencallableunder the current access
 control context, with the current context class loader as the
 context class loader. | 
| <V> ScheduledFuture<V> | ScheduledExecutorService. schedule(Callable<V> callable,
        long delay,
        TimeUnit unit)Creates and executes a ScheduledFuture that becomes enabled after the
 given delay. | 
| <V> ScheduledFuture<V> | ScheduledThreadPoolExecutor. schedule(Callable<V> callable,
        long delay,
        TimeUnit unit) | 
| <T> Future<T> | AbstractExecutorService. submit(Callable<T> task) | 
| <T> ForkJoinTask<T> | ForkJoinPool. submit(Callable<T> task) | 
| <T> Future<T> | ExecutorService. submit(Callable<T> task)Submits a value-returning task for execution and returns a
 Future representing the pending results of the task. | 
| <T> Future<T> | ScheduledThreadPoolExecutor. submit(Callable<T> task) | 
| Future<V> | CompletionService. submit(Callable<V> task)Submits a value-returning task for execution and returns a Future
 representing the pending results of the task. | 
| Future<V> | ExecutorCompletionService. submit(Callable<V> task) | 
| Modifier and Type | Method and Description | 
|---|---|
| <T> List<Future<T>> | AbstractExecutorService. invokeAll(Collection<? extends Callable<T>> tasks) | 
| <T> List<Future<T>> | ForkJoinPool. invokeAll(Collection<? extends Callable<T>> tasks) | 
| <T> List<Future<T>> | ExecutorService. invokeAll(Collection<? extends Callable<T>> tasks)Executes the given tasks, returning a list of Futures holding
 their status and results when all complete. | 
| <T> List<Future<T>> | AbstractExecutorService. invokeAll(Collection<? extends Callable<T>> tasks,
         long timeout,
         TimeUnit unit) | 
| <T> List<Future<T>> | ExecutorService. invokeAll(Collection<? extends Callable<T>> tasks,
         long timeout,
         TimeUnit unit)Executes the given tasks, returning a list of Futures holding
 their status and results
 when all complete or the timeout expires, whichever happens first. | 
| <T> T | AbstractExecutorService. invokeAny(Collection<? extends Callable<T>> tasks) | 
| <T> T | ExecutorService. invokeAny(Collection<? extends Callable<T>> tasks)Executes the given tasks, returning the result
 of one that has completed successfully (i.e., without throwing
 an exception), if any do. | 
| <T> T | AbstractExecutorService. invokeAny(Collection<? extends Callable<T>> tasks,
         long timeout,
         TimeUnit unit) | 
| <T> T | ExecutorService. invokeAny(Collection<? extends Callable<T>> tasks,
         long timeout,
         TimeUnit unit)Executes the given tasks, returning the result
 of one that has completed successfully (i.e., without throwing
 an exception), if any do before the given timeout elapses. | 
| Constructor and Description | 
|---|
| FutureTask(Callable<V> callable)Creates a  FutureTaskthat will, upon running, execute the
 givenCallable. | 
| Modifier and Type | Interface and Description | 
|---|---|
| static interface  | DocumentationTool.DocumentationTaskInterface representing a future for a documentation task. | 
| static interface  | JavaCompiler.CompilationTaskInterface representing a future for a compilation task. | 
 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, 2017, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.