ExecutorService that returns ListenableFuture instances. To create an instance
from an existing ExecutorService, call MoreExecutors#listeningDecorator(ExecutorService).
| Modifier and Type | Method and Description |
|---|---|
| public default boolean | |
| public <T extends @Nullable Object> List | Returns: A list ofListenableFuture instances representing the tasks, in the same
sequential order as produced by the iterator for the given task list, each of which has
completed.the collection of tasks tasks)Redeclares java. |
| public <T extends @Nullable Object> List | Returns: a list ofListenableFuture instances representing the tasks, in the same
sequential order as produced by the iterator for the given task list. If the operation did
not time out, each task will have completed. If it did time out, some of these tasks will
not have completed.the collection of tasks tasks, long the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Redeclares java. |
| public default <T extends @Nullable Object> List | invokeAll(Collection<? extends Callable<T>> tasks, Duration timeout)
Duration-based overload of |
| public default <T extends @Nullable Object> T | invokeAny(Collection<? extends Callable<T>> tasks, Duration timeout)
Duration-based overload of |
| public <T extends @Nullable Object> ListenableFuture | Returns: aListenableFuture representing pending completion of the taskthe task to submit task)Redeclares java. |
| public ListenableFuture | Returns: aListenableFuture representing pending completion of the taskthe task to submit task)Redeclares java. |
| public <T extends @Nullable Object> ListenableFuture | Returns: aListenableFuture representing pending completion of the taskthe task to submit task, T the result to return result)Redeclares java. |
| awaitTermination | back to summary |
|---|---|
| public default boolean awaitTermination(Duration timeout) throws InterruptedException Duration-based overload of
| |
| invokeAll | back to summary |
|---|---|
| public <T extends @Nullable Object> List Redeclares java. Doc from java. Executes the given tasks, returning a list of Futures holding
their status and results when all complete.
All elements in the returned list must be
| |
| invokeAll | back to summary |
|---|---|
| public <T extends @Nullable Object> List Redeclares java. Doc from java. Executes the given tasks, returning a list of Futures holding
their status and results
when all complete or the timeout expires, whichever happens first.
All elements in the returned list must be
| |
| invokeAll | back to summary |
|---|---|
| public default <T extends @Nullable Object> List Duration-based overload of
| |
| invokeAny | back to summary |
|---|---|
| public default <T extends @Nullable Object> T invokeAny(Collection<? extends Callable<T>> tasks, Duration timeout) throws InterruptedException, ExecutionException, TimeoutException Duration-based overload of
| |
| submit | back to summary |
|---|---|
| public <T extends @Nullable Object> ListenableFuture Redeclares java. Doc from java. Submits a value-returning task for execution and returns a
Future representing the pending results of the task. The
Future's
If you would like to immediately block waiting
for a task, you can use constructions of the form
Note The
| |
| submit | back to summary |
|---|---|
| public ListenableFuture Redeclares java. Doc from java. Submits a Runnable task for execution and returns a Future
representing that task. The Future's
| |
| submit | back to summary |
|---|---|
| public <T extends @Nullable Object> ListenableFuture Redeclares java. Doc from java. Submits a Runnable task for execution and returns a Future
representing that task. The Future's
| |