Uses of Interface
java.util.concurrent.Future
Package
Description
Defines channels, which represent connections to entities that are capable of
performing I/O operations, such as files and sockets; defines selectors, for
multiplexed, non-blocking I/O operations.
Utility classes commonly useful in concurrent programming.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Defines non-final APIs for concurrent programming.
-
Uses of Future in java.nio.channels
Modifier and TypeMethodDescriptionabstract Future<AsynchronousSocketChannel>
AsynchronousServerSocketChannel.accept()
Accepts a connection.AsynchronousSocketChannel.connect
(SocketAddress remote) Connects this channel.AsynchronousFileChannel.lock()
Acquires an exclusive lock on this channel's file.AsynchronousFileChannel.lock
(long position, long size, boolean shared) Acquires a lock on the given region of this channel's file.AsynchronousByteChannel.read
(ByteBuffer dst) Reads a sequence of bytes from this channel into the given buffer.AsynchronousFileChannel.read
(ByteBuffer dst, long position) Reads a sequence of bytes from this channel into the given buffer, starting at the given file position.AsynchronousSocketChannel.read
(ByteBuffer dst) AsynchronousByteChannel.write
(ByteBuffer src) Writes a sequence of bytes to this channel from the given buffer.AsynchronousFileChannel.write
(ByteBuffer src, long position) Writes a sequence of bytes to this channel from the given buffer, starting at the given file position.AsynchronousSocketChannel.write
(ByteBuffer src) -
Uses of Future in java.util.concurrent
Modifier and TypeInterfaceDescriptioninterface
interface
AScheduledFuture
that isRunnable
.interface
A delayed result-bearing action that can be cancelled.Modifier and TypeClassDescriptionclass
AFuture
that may be explicitly completed (setting its value and status), and may be used as aCompletionStage
, supporting dependent functions and actions that trigger upon its completion.class
AForkJoinTask
with a completion action performed when triggered and there are no remaining pending actions.class
ForkJoinTask<V>
Abstract base class for tasks that run within aForkJoinPool
.class
FutureTask<V>
A cancellable asynchronous computation.class
A recursive resultlessForkJoinTask
.class
A recursive result-bearingForkJoinTask
.Modifier and TypeMethodDescriptionCompletionService.poll()
Retrieves and removes the Future representing the next completed task, ornull
if none are present.Retrieves and removes the Future representing the next completed task, waiting if necessary up to the specified wait time if none are yet present.ExecutorCompletionService.poll()
Future<?>
<T> Future<T>
<T> Future<T>
Submits a Runnable task for execution and returns a Future representing that task.Submits a value-returning task for execution and returns a Future representing the pending results of the task.Future<?>
Submits a Runnable task for execution and returns a Future representing that task.<T> Future<T>
Submits a Runnable task for execution and returns a Future representing that task.<T> Future<T>
Submits a value-returning task for execution and returns a Future representing the pending results of the task.Future<?>
<T> Future<T>
<T> Future<T>
CompletionService.take()
Retrieves and removes the Future representing the next completed task, waiting if none are yet present.ExecutorCompletionService.take()
Modifier and TypeMethodDescriptionAbstractExecutorService.invokeAll
(Collection<? extends Callable<T>> tasks) AbstractExecutorService.invokeAll
(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) ExecutorService.invokeAll
(Collection<? extends Callable<T>> tasks) Executes the given tasks, returning a list of Futures holding their status and results when all complete.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.ForkJoinPool.invokeAll
(Collection<? extends Callable<T>> tasks) ModifierConstructorDescriptionExecutorCompletionService
(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 Future in javax.swing
Modifier and TypeClassDescriptionclass
SwingWorker<T,
V> An abstract class to perform lengthy GUI-interaction tasks in a background thread. -
Uses of Future in jdk.incubator.concurrent
Modifier and TypeMethodDescriptionStarts a new thread to run the given task.Modifier and TypeMethodDescriptionprotected void
StructuredTaskScope.handleComplete
(Future<T> future) Invoked when a task completes before the scope is shut down.protected void
StructuredTaskScope.ShutdownOnFailure.handleComplete
(Future<Object> future) Shut down the given task scope when invoked for the first time with aFuture
for a task that completed abnormally (exception or cancelled).protected void
StructuredTaskScope.ShutdownOnSuccess.handleComplete
(Future<T> future) Shut down the given task scope when invoked for the first time with aFuture
for a task that completed with a result.