Package | Description |
---|---|
com.google.common.util.concurrent |
Concurrency utilities.
|
com.google.common.util.concurrent.testing |
Modifier and Type | Interface and Description |
---|---|
interface |
ListeningScheduledExecutorService
A
ScheduledExecutorService that returns ListenableFuture instances from its
ExecutorService methods. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractListeningExecutorService
Abstract
ListeningExecutorService implementation that creates ListenableFuture
instances for each Runnable and Callable submitted to it. |
class |
ForwardingListeningExecutorService
A listening executor service which forwards all its method calls to another listening executor
service.
|
private static class |
MoreExecutors.DirectExecutorService |
private static class |
MoreExecutors.ListeningDecorator |
private static class |
MoreExecutors.ScheduledListeningDecorator |
Modifier and Type | Method and Description |
---|---|
protected abstract ListeningExecutorService |
ForwardingListeningExecutorService.delegate() |
static ListeningExecutorService |
MoreExecutors.listeningDecorator(java.util.concurrent.ExecutorService delegate)
Creates an
ExecutorService whose submit and invokeAll methods submit
ListenableFutureTask instances to the given delegate executor. |
static ListeningExecutorService |
MoreExecutors.newDirectExecutorService()
Creates an executor service that runs each task in the thread that invokes
execute/submit , as in ThreadPoolExecutor.CallerRunsPolicy . |
Modifier and Type | Method and Description |
---|---|
static <T> AsyncCallable<T> |
Callables.asAsyncCallable(java.util.concurrent.Callable<T> callable,
ListeningExecutorService listeningExecutorService)
Creates an
AsyncCallable from a Callable . |
(package private) static <T> T |
MoreExecutors.invokeAnyImpl(ListeningExecutorService executorService,
java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks,
boolean timed,
java.time.Duration timeout)
An implementation of
ExecutorService.invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>) for ListeningExecutorService
implementations. |
(package private) static <T> T |
MoreExecutors.invokeAnyImpl(ListeningExecutorService executorService,
java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks,
boolean timed,
long timeout,
java.util.concurrent.TimeUnit unit)
An implementation of
ExecutorService.invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>) for ListeningExecutorService
implementations. |
private static <T> ListenableFuture<T> |
MoreExecutors.submitAndAddQueueListener(ListeningExecutorService executorService,
java.util.concurrent.Callable<T> task,
java.util.concurrent.BlockingQueue<java.util.concurrent.Future<T>> queue)
Submits the task and adds a listener that adds the future to
queue when it completes. |
Modifier and Type | Class and Description |
---|---|
(package private) class |
SameThreadScheduledExecutorService
A ScheduledExecutorService that executes all scheduled actions immediately in the calling thread.
|
private static class |
TestingExecutors.NoOpScheduledExecutorService |
Modifier and Type | Field and Description |
---|---|
private ListeningExecutorService |
SameThreadScheduledExecutorService.delegate |