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.
-
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.invokeAllUninterruptibly
(Collection<? extends Callable<T>> tasks) Uninterrupible version ofinvokeAll
.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.