| 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 |
Executors.callable(PrivilegedAction
Returns a
Callable object that, when called, runs the given privileged action and returns its result.
|
static Callable |
Executors.callable(PrivilegedExceptionAction
Returns a
Callable object that, when called, runs the given privileged exception action and returns its result.
|
static Callable |
Executors.callable(Runnable
Returns a
Callable object that, when called, runs the given task and returns
null.
|
static <T> Callable |
Executors.callable(Runnable
Returns a
Callable object that, when called, runs the given task and returns the given result.
|
static <T> Callable |
Executors.privilegedCallable(Callable
Returns a
Callable object that will, when called, execute the given
callable under the current access control context.
|
static <T> Callable |
Executors.privilegedCallableUsingCurrentClassLoader(Callable
Returns a
Callable object that will, when called, execute the given
callable under 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 |
ForkJoinTask.adapt(Callable
Returns a new
ForkJoinTask that performs the
call method of the given
Callable as its action, and returns its result upon
ForkJoinTask, translating any checked exceptions encountered into
RuntimeException.
|
protected <V> RunnableScheduledFuture |
ScheduledThreadPoolExecutor.decorateTask(Callable
Modifies or replaces the task used to execute a callable.
|
protected <T> RunnableFuture |
ForkJoinPool.newTaskFor(Callable
|
protected <T> RunnableFuture |
AbstractExecutorService.newTaskFor(Callable
Returns a
RunnableFuture for the given callable task.
|
static <T> Callable |
Executors.privilegedCallable(Callable
Returns a
Callable object that will, when called, execute the given
callable under the current access control context.
|
static <T> Callable |
Executors.privilegedCallableUsingCurrentClassLoader(Callable
Returns a
Callable object that will, when called, execute the given
callable under the current access control context, with the current context class loader as the context class loader.
|
<V> ScheduledFuture |
ScheduledThreadPoolExecutor.schedule(Callable
|
<V> ScheduledFuture |
ScheduledExecutorService.schedule(Callable
Creates and executes a ScheduledFuture that becomes enabled after the given delay.
|
<T> Future |
ExecutorService.submit(Callable
Submits a value-returning task for execution and returns a Future representing the pending results of the task.
|
<T> ForkJoinTask |
ForkJoinPool.submit(Callable
|
<T> Future |
ScheduledThreadPoolExecutor.submit(Callable
|
<T> Future |
AbstractExecutorService.submit(Callable
|
Future |
ExecutorCompletionService.submit(Callable
|
Future |
CompletionService.submit(Callable
Submits a value-returning task for execution and returns a Future representing the pending results of the task.
|
| Modifier and Type | Method and Description |
|---|---|
<T> List |
ExecutorService.invokeAll(Collection
Executes the given tasks, returning a list of Futures holding their status and results when all complete.
|
<T> List |
ForkJoinPool.invokeAll(Collection
|
<T> List |
AbstractExecutorService.invokeAll(Collection
|
<T> List |
ExecutorService.invokeAll(Collection
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> List |
AbstractExecutorService.invokeAll(Collection
|
<T> T |
ExecutorService.invokeAny(Collection
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
|
<T> T |
ExecutorService.invokeAny(Collection
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.
|
<T> T |
AbstractExecutorService.invokeAny(Collection
|
| Constructor and Description | |
|---|---|
FutureTask(Callable
Creates a
FutureTask that will, upon running, execute the given
Callable.
|
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DocumentationTool
Interface representing a future for a documentation task.
|
static interface |
JavaCompiler
Interface representing a future for a compilation task.
|