# Uses of Interface
java.util.concurrent.Callable

Packages that use Callable
Package
Description
com.sun.source.util
Provides utilities for operations on abstract syntax trees (AST).
java.util.concurrent
Utility classes commonly useful in concurrent programming.
javax.security.auth
This package provides a framework for authentication and authorization.
javax.tools
Provides interfaces for tools which can be invoked from a program, for example, compilers.

- ## Uses of Callable in com.sun.source.util

  Classes in com.sun.source.util that implement Callable
  Modifier and Type
  Class
  Description
  `class`
  `JavacTask`
  Provides access to functionality specific to the JDK Java Compiler, javac.

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

  Methods in java.util.concurrent that return Callable
  Modifier and Type
  Method
  Description
  `static Callable<Object>`
  Executors.`callable(Runnable task)`
  Returns a `Callable` object that, when called, runs the given task and returns `null`.
  `static <T> Callable<T>`
  Executors.`callable(Runnable task, T result)`
  Returns a `Callable` object that, when called, runs the given task and returns the given result.
  `static Callable<Object>`
  Executors.`callable(PrivilegedAction<?> action)`
  Returns a `Callable` object that, when called, runs the given privileged action and returns its result.
  `static Callable<Object>`
  Executors.`callable(PrivilegedExceptionAction<?> action)`
  Returns a `Callable` object that, when called, runs the given privileged exception action and returns its result.
  `static <T> Callable<T>`
  Executors.`privilegedCallable(Callable<T> callable)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  This method originally returned a `Callable` object that when called, executed the given `callable` under the current access control context.
  `static <T> Callable<T>`
  Executors.`privilegedCallableUsingCurrentClassLoader(Callable<T> callable)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  This method originally returned a `Callable` object that when called, executed the given `callable` under the current access control context, with the current context class loader as the context class loader.
  Methods in java.util.concurrent with parameters of type Callable
  Modifier and Type
  Method
  Description
  `static <T> ForkJoinTask<T>`
  ForkJoinTask.`adapt(Callable<? extends T> callable)`
  Returns a new `ForkJoinTask` that performs the `call` method of the given `Callable` as its action, and returns its result upon `ForkJoinTask.join()`, translating any checked exceptions encountered into `RuntimeException`.
  `static <T> ForkJoinTask<T>`
  ForkJoinTask.`adaptInterruptible(Callable<? extends T> callable)`
  Returns a new `ForkJoinTask` that performs the `call` method of the given `Callable` as its action, and returns its result upon `ForkJoinTask.join()`, translating any checked exceptions encountered into `RuntimeException`.
  `protected <V> RunnableScheduledFuture<V>`
  ScheduledThreadPoolExecutor.`decorateTask(Callable<V> callable, RunnableScheduledFuture<V> task)`
  Modifies or replaces the task used to execute a callable.
  `<U extends T>
  StructuredTaskScope.SubtaskPREVIEW<U>`
  StructuredTaskScope.`fork(Callable<? extends U> task)`
  Fork a subtask by starting a new thread in this scope to execute a value-returning method.
  `protected <T> RunnableFuture<T>`
  AbstractExecutorService.`newTaskFor(Callable<T> callable)`
  Returns a `RunnableFuture` for the given callable task.
  `static <T> Callable<T>`
  Executors.`privilegedCallable(Callable<T> callable)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  This method originally returned a `Callable` object that when called, executed the given `callable` under the current access control context.
  `static <T> Callable<T>`
  Executors.`privilegedCallableUsingCurrentClassLoader(Callable<T> callable)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  This method originally returned a `Callable` object that when called, executed the given `callable` under the current access control context, with the current context class loader as the context class loader.
  `<V> ScheduledFuture<V>`
  ForkJoinPool.`schedule(Callable<V> callable, long delay, TimeUnit unit)`
  Submits a value-returning one-shot task that becomes enabled after the given delay.
  `<V> ScheduledFuture<V>`
  ScheduledExecutorService.`schedule(Callable<V> callable, long delay, TimeUnit unit)`
  Submits a value-returning one-shot task 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)`
  `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)`
  `<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> ForkJoinTask<T>`
  ForkJoinPool.`submit(Callable<T> task)`
  `<T> Future<T>`
  ScheduledThreadPoolExecutor.`submit(Callable<T> task)`
  `<V> ForkJoinTask<V>`
  ForkJoinPool.`submitWithTimeout(Callable<V> callable, long timeout, TimeUnit unit, Consumer<? super ForkJoinTask<V>> timeoutAction)`
  Submits a task executing the given function, cancelling the task or performing a given timeoutAction if not completed within the given timeout period.
  Method parameters in java.util.concurrent with type arguments of type Callable
  Modifier and Type
  Method
  Description
  `<T> List<Future<T>>`
  AbstractExecutorService.`invokeAll(Collection<? extends Callable<T>> tasks)`
  `<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)`
  Executes the given tasks, returning a list of Futures holding their status and results when all complete.
  `<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> List<Future<T>>`
  ForkJoinPool.`invokeAll(Collection<? extends Callable<T>> tasks)`
  `<T> List<Future<T>>`
  ForkJoinPool.`invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)`
  `<T> List<Future<T>>`
  ForkJoinPool.`invokeAllUninterruptibly(Collection<? extends Callable<T>> tasks)`
  Uninterrupible version of `invokeAll`.
  `<T> T`
  AbstractExecutorService.`invokeAny(Collection<? extends Callable<T>> tasks)`
  `<T> T`
  AbstractExecutorService.`invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)`
  `<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`
  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.
  `<T> T`
  ForkJoinPool.`invokeAny(Collection<? extends Callable<T>> tasks)`
  `<T> T`
  ForkJoinPool.`invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)`
  Constructors in java.util.concurrent with parameters of type Callable
  Modifier
  Constructor
  Description
  ``
  `FutureTask(Callable<V> callable)`
  Creates a `FutureTask` that will, upon running, execute the given `Callable`.

- ## Uses of Callable in javax.security.auth

  Methods in javax.security.auth with parameters of type Callable
  Modifier and Type
  Method
  Description
  `static <T> T`
  Subject.`callAs(Subject subject, Callable<T> action)`
  Executes a `Callable` with `subject` as the current subject.

- ## Uses of Callable in javax.tools

  Subinterfaces of Callable in javax.tools
  Modifier and Type
  Interface
  Description
  `static interface`
  `DocumentationTool.DocumentationTask`
  Interface representing a future for a documentation task.
  `static interface`
  `JavaCompiler.CompilationTask`
  Interface representing a future for a compilation task.