Interface ListeningExecutorService
- All Superinterfaces:
AutoCloseable,Executor,ExecutorService
- All Known Subinterfaces:
ListeningScheduledExecutorService
- All Known Implementing Classes:
AbstractListeningExecutorService,ForwardingListeningExecutorService
Deprecated.
The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
An
ExecutorService that returns ListenableFuture instances. To create an instance
from an existing ExecutorService, call
MoreExecutors.listeningDecorator(ExecutorService).- Since:
- 10.0
-
Method Summary
Modifier and TypeMethodDescriptioninvokeAll(Collection<? extends Callable<T>> tasks) Deprecated.invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) Deprecated.Deprecated.<T> ListenableFuture<T> Deprecated.<T> ListenableFuture<T> Deprecated.Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, close, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow
-
Method Details
-
submit
Deprecated.- Specified by:
submitin interfaceExecutorService- Returns:
- a
ListenableFuturerepresenting pending completion of the task
-
submit
Deprecated.- Specified by:
submitin interfaceExecutorService- Returns:
- a
ListenableFuturerepresenting pending completion of the task
-
submit
Deprecated.- Specified by:
submitin interfaceExecutorService- Returns:
- a
ListenableFuturerepresenting pending completion of the task
-
invokeAll
Deprecated.All elements in the returned list must be
ListenableFutureinstances. The easiest way to obtain aList<ListenableFuture<T>>from this method is an unchecked (but safe) cast:@SuppressWarnings("unchecked") // guaranteed by invokeAll contractList<ListenableFuture<T>> futures = (List) executor.invokeAll(tasks);- Specified by:
invokeAllin interfaceExecutorService- Returns:
- A list of
ListenableFutureinstances representing the tasks, in the same sequential order as produced by the iterator for the given task list, each of which has completed.
-
invokeAll
<T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException Deprecated.All elements in the returned list must be
ListenableFutureinstances. The easiest way to obtain aList<ListenableFuture<T>>from this method is an unchecked (but safe) cast:@SuppressWarnings("unchecked") // guaranteed by invokeAll contractList<ListenableFuture<T>> futures = (List) executor.invokeAll(tasks, timeout, unit);- Specified by:
invokeAllin interfaceExecutorService- Returns:
- a list of
ListenableFutureinstances 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.
-