Interface ListeningExecutorService
-
- All Superinterfaces:
java.util.concurrent.Executor,java.util.concurrent.ExecutorService
- All Known Subinterfaces:
ListeningScheduledExecutorService
- All Known Implementing Classes:
AbstractListeningExecutorService,ForwardingListeningExecutorService
@Deprecated(since="2022-12-01") public interface ListeningExecutorService extends java.util.concurrent.ExecutorServiceDeprecated.The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023AnExecutorServicethat returnsListenableFutureinstances. To create an instance from an existingExecutorService, callMoreExecutors.listeningDecorator(ExecutorService).- Since:
- 10.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description <T> java.util.List<java.util.concurrent.Future<T>>invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)Deprecated.<T> java.util.List<java.util.concurrent.Future<T>>invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, java.util.concurrent.TimeUnit unit)Deprecated.ListenableFuture<?>submit(java.lang.Runnable task)Deprecated.<T> ListenableFuture<T>submit(java.lang.Runnable task, T result)Deprecated.<T> ListenableFuture<T>submit(java.util.concurrent.Callable<T> task)Deprecated.
-
-
-
Method Detail
-
submit
<T> ListenableFuture<T> submit(java.util.concurrent.Callable<T> task)
Deprecated.- Specified by:
submitin interfacejava.util.concurrent.ExecutorService- Returns:
- a
ListenableFuturerepresenting pending completion of the task - Throws:
java.util.concurrent.RejectedExecutionException
-
submit
ListenableFuture<?> submit(java.lang.Runnable task)
Deprecated.- Specified by:
submitin interfacejava.util.concurrent.ExecutorService- Returns:
- a
ListenableFuturerepresenting pending completion of the task - Throws:
java.util.concurrent.RejectedExecutionException
-
submit
<T> ListenableFuture<T> submit(java.lang.Runnable task, T result)
Deprecated.- Specified by:
submitin interfacejava.util.concurrent.ExecutorService- Returns:
- a
ListenableFuturerepresenting pending completion of the task - Throws:
java.util.concurrent.RejectedExecutionException
-
invokeAll
<T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) throws java.lang.InterruptedExceptionDeprecated.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 interfacejava.util.concurrent.ExecutorService- 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. - Throws:
java.util.concurrent.RejectedExecutionExceptionjava.lang.NullPointerException- if any task is nulljava.lang.InterruptedException
-
invokeAll
<T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedExceptionDeprecated.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 interfacejava.util.concurrent.ExecutorService- 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. - Throws:
java.util.concurrent.RejectedExecutionExceptionjava.lang.NullPointerException- if any task is nulljava.lang.InterruptedException
-
-