@ParametersAreNonnullByDefault
See: Description
Interface | Description |
---|---|
AbstractFuture.Trusted<V> |
Tag interface marking trusted subclasses.
|
AbstractScheduledService.Cancellable | |
AsyncCallable<V> |
Computes a value, possibly asynchronously.
|
AsyncFunction<I,O> |
Transforms a value, possibly asynchronously.
|
ClosingFuture.AsyncClosingCallable<V> |
An operation that computes a
ClosingFuture of a result. |
ClosingFuture.AsyncClosingFunction<T,U> |
A function from an input to a
ClosingFuture of a result. |
ClosingFuture.ClosingCallable<V> |
An operation that computes a result.
|
ClosingFuture.ClosingFunction<T,U> |
A function from an input to a result.
|
ClosingFuture.Combiner.AsyncCombiningCallable<V> |
An operation that returns a
ClosingFuture result and may throw an exception. |
ClosingFuture.Combiner.CombiningCallable<V> |
An operation that returns a result and may throw an exception.
|
ClosingFuture.Combiner2.AsyncClosingFunction2<V1,V2,U> |
A function that returns a
ClosingFuture when applied to the values of the two futures
passed to ClosingFuture.whenAllSucceed(ClosingFuture, ClosingFuture) . |
ClosingFuture.Combiner2.ClosingFunction2<V1,V2,U> |
A function that returns a value when applied to the values of the two futures passed to
ClosingFuture.whenAllSucceed(ClosingFuture, ClosingFuture) . |
ClosingFuture.Combiner3.AsyncClosingFunction3<V1,V2,V3,U> |
A function that returns a
ClosingFuture when applied to the values of the three
futures passed to ClosingFuture.whenAllSucceed(ClosingFuture, ClosingFuture, ClosingFuture) . |
ClosingFuture.Combiner3.ClosingFunction3<V1,V2,V3,U> |
A function that returns a value when applied to the values of the three futures passed to
ClosingFuture.whenAllSucceed(ClosingFuture, ClosingFuture, ClosingFuture) . |
ClosingFuture.Combiner4.AsyncClosingFunction4<V1,V2,V3,V4,U> |
A function that returns a
ClosingFuture when applied to the values of the four
futures passed to ClosingFuture.whenAllSucceed(ClosingFuture, ClosingFuture, ClosingFuture,
ClosingFuture) . |
ClosingFuture.Combiner4.ClosingFunction4<V1,V2,V3,V4,U> |
A function that returns a value when applied to the values of the four futures passed to
ClosingFuture.whenAllSucceed(ClosingFuture, ClosingFuture, ClosingFuture, ClosingFuture) . |
ClosingFuture.Combiner5.AsyncClosingFunction5<V1,V2,V3,V4,V5,U> |
A function that returns a
ClosingFuture when applied to the values of the five
futures passed to ClosingFuture.whenAllSucceed(ClosingFuture, ClosingFuture, ClosingFuture,
ClosingFuture, ClosingFuture) . |
ClosingFuture.Combiner5.ClosingFunction5<V1,V2,V3,V4,V5,U> |
A function that returns a value when applied to the values of the five futures passed to
ClosingFuture.whenAllSucceed(ClosingFuture, ClosingFuture, ClosingFuture, ClosingFuture,
ClosingFuture) . |
ClosingFuture.ValueAndCloserConsumer<V> |
Represents an operation that accepts a
ClosingFuture.ValueAndCloser for the last step in a ClosingFuture pipeline. |
CycleDetectingLockFactory.CycleDetectingLock |
Internal Lock implementations implement the
CycleDetectingLock interface, allowing the
detection logic to treat all locks in the same manner. |
CycleDetectingLockFactory.Policy |
Encapsulates the action to be taken when a potential deadlock is encountered.
|
FutureCallback<V> |
A callback for accepting the results of a
Future computation
asynchronously. |
FuturesGetChecked.GetCheckedTypeValidator | |
ListenableFuture<V> |
A
Future that accepts completion listeners. |
ListenableScheduledFuture<V> |
Helper interface to implement both
ListenableFuture and ScheduledFuture . |
ListenerCallQueue.Event<L> |
Method reference-compatible listener event.
|
ListeningExecutorService |
An
ExecutorService that returns ListenableFuture instances. |
ListeningScheduledExecutorService |
A
ScheduledExecutorService that returns ListenableFuture instances from its
ExecutorService methods. |
Service |
An object with an operational state, plus asynchronous
Service.startAsync() and Service.stopAsync() lifecycle methods to transition between states. |
ServiceManagerBridge |
Superinterface of
ServiceManager to introduce a bridge method for servicesByState() , to ensure binary compatibility with older Guava versions that specified
servicesByState() to return ImmutableMultimap . |
TimeLimiter |
Imposes a time limit on method calls.
|
Class | Description |
---|---|
AbstractCatchingFuture<V,X extends java.lang.Throwable,F,T> |
Implementations of
Futures.catching* . |
AbstractCatchingFuture.AsyncCatchingFuture<V,X extends java.lang.Throwable> |
An
AbstractCatchingFuture that delegates to an AsyncFunction and AbstractFuture.setFuture(ListenableFuture) . |
AbstractCatchingFuture.CatchingFuture<V,X extends java.lang.Throwable> | |
AbstractExecutionThreadService |
Base class for services that can implement
AbstractExecutionThreadService.startUp() , AbstractExecutionThreadService.run() and AbstractExecutionThreadService.shutDown()
methods. |
AbstractFuture<V> |
An abstract implementation of
ListenableFuture , intended for advanced users only. |
AbstractFuture.AtomicHelper | |
AbstractFuture.Cancellation |
A special value to represent cancellation and the 'wasInterrupted' bit.
|
AbstractFuture.Failure |
A special value to represent failure, when
AbstractFuture.setException(java.lang.Throwable) is called successfully. |
AbstractFuture.Listener |
Listeners also form a stack through the
AbstractFuture.listeners field. |
AbstractFuture.SafeAtomicHelper |
AbstractFuture.AtomicHelper based on AtomicReferenceFieldUpdater . |
AbstractFuture.SetFuture<V> |
A special value that encodes the 'setFuture' state.
|
AbstractFuture.SynchronizedHelper |
AbstractFuture.AtomicHelper based on synchronized and volatile writes. |
AbstractFuture.TrustedFuture<V> |
A less abstract subclass of AbstractFuture.
|
AbstractFuture.UnsafeAtomicHelper |
AbstractFuture.AtomicHelper based on Unsafe . |
AbstractFuture.Waiter |
Waiter links form a Treiber stack, in the
AbstractFuture.waiters field. |
AbstractIdleService |
Base class for services that do not need a thread while "running" but may need one during startup
and shutdown.
|
AbstractListeningExecutorService |
Abstract
ListeningExecutorService implementation that creates ListenableFuture
instances for each Runnable and Callable submitted to it. |
AbstractScheduledService |
Base class for services that can implement
AbstractScheduledService.startUp() and AbstractScheduledService.shutDown() but while in
the "running" state need to perform a periodic task. |
AbstractScheduledService.CustomScheduler |
A
AbstractScheduledService.Scheduler that provides a convenient way for the AbstractScheduledService to
use a dynamically changing schedule. |
AbstractScheduledService.CustomScheduler.Schedule |
A value object that represents an absolute delay until a task should be invoked.
|
AbstractScheduledService.CustomScheduler.SupplantableFuture |
Contains the most recently submitted
Future , which may be cancelled or updated,
always under a lock. |
AbstractScheduledService.FutureAsCancellable | |
AbstractScheduledService.Scheduler |
A scheduler defines the policy for how the
AbstractScheduledService should run its
task. |
AbstractService |
Base class for implementing services that can handle
AbstractService.doStart() and AbstractService.doStop()
requests, responding to them with AbstractService.notifyStarted() and AbstractService.notifyStopped()
callbacks. |
AbstractService.StateSnapshot |
An immutable snapshot of the current state of the service.
|
AbstractTransformFuture<I,O,F,T> |
Implementations of
Futures.transform* . |
AbstractTransformFuture.AsyncTransformFuture<I,O> |
An
AbstractTransformFuture that delegates to an AsyncFunction and AbstractFuture.setFuture(ListenableFuture) . |
AbstractTransformFuture.TransformFuture<I,O> | |
AggregateFuture<InputT,OutputT> |
A future whose value is derived from a collection of input futures.
|
AggregateFutureState<OutputT> |
A helper which does some thread-safe operations for aggregate futures, which must be implemented
differently in GWT.
|
AggregateFutureState.AtomicHelper | |
AggregateFutureState.SafeAtomicHelper | |
AggregateFutureState.SynchronizedAtomicHelper | |
AtomicDouble |
A
double value that may be updated atomically. |
AtomicDoubleArray |
A
double array in which elements may be updated atomically. |
AtomicLongMap<K> |
A map containing
long values that can be atomically updated. |
Atomics |
Static utility methods pertaining to classes in the
java.util.concurrent.atomic package. |
Callables |
Static utility methods pertaining to the
Callable interface. |
ClosingFuture<V> |
A step in a pipeline of an asynchronous computation.
|
ClosingFuture.CloseableList | |
ClosingFuture.Combiner |
A builder of a
ClosingFuture step that is derived from more than one input step. |
ClosingFuture.Combiner2<V1,V2> |
A generic
ClosingFuture.Combiner that lets you use a lambda or method reference to combine two ClosingFuture s. |
ClosingFuture.Combiner3<V1,V2,V3> |
A generic
ClosingFuture.Combiner that lets you use a lambda or method reference to combine three
ClosingFuture s. |
ClosingFuture.Combiner4<V1,V2,V3,V4> |
A generic
ClosingFuture.Combiner that lets you use a lambda or method reference to combine four
ClosingFuture s. |
ClosingFuture.Combiner5<V1,V2,V3,V4,V5> |
A generic
ClosingFuture.Combiner that lets you use a lambda or method reference to combine five
ClosingFuture s. |
ClosingFuture.DeferredCloser |
An object that can capture objects to be closed later, when a
ClosingFuture pipeline is
done. |
ClosingFuture.Peeker |
An object that can return the value of the
ClosingFuture s that are passed to ClosingFuture.whenAllComplete(Iterable) or ClosingFuture.whenAllSucceed(Iterable) . |
ClosingFuture.ValueAndCloser<V> |
An object that holds the final result of an asynchronous
ClosingFuture operation and
allows the user to close all the closeable objects that were captured during it for later
closing. |
CollectionFuture<V,C> |
Aggregate future that collects (stores) results of each future.
|
CollectionFuture.ListFuture<V> | |
CollectionFuture.Present<V> |
The result of a successful
Future . |
CombinedFuture<V> |
Aggregate future that computes its value by calling a callable.
|
CycleDetectingLockFactory |
The
CycleDetectingLockFactory creates ReentrantLock instances and ReentrantReadWriteLock instances that detect potential deadlock by checking for cycles in lock
acquisition order. |
CycleDetectingLockFactory.LockGraphNode |
A
LockGraphNode associated with each lock instance keeps track of the directed edges in
the lock acquisition graph. |
CycleDetectingLockFactory.WithExplicitOrdering<E extends java.lang.Enum<E>> |
A
CycleDetectingLockFactory.WithExplicitOrdering provides the additional enforcement of
an application-specified ordering of lock acquisitions. |
ExecutionList |
A support class for
ListenableFuture implementations to manage their listeners. |
ExecutionList.RunnableExecutorPair | |
ExecutionSequencer |
Serializes execution of tasks, somewhat like an "asynchronous
synchronized block." Each
enqueued callable will not be submitted to its associated executor until the
previous callable has returned -- and, if the previous callable was an AsyncCallable , not
until the Future it returned is done (successful, failed, or
cancelled). |
ExecutionSequencer.TaskNonReentrantExecutor |
This class helps avoid a StackOverflowError when large numbers of tasks are submitted with
MoreExecutors.directExecutor() . |
ExecutionSequencer.ThreadConfinedTaskQueue |
This object is unsafely published, but avoids problematic races by relying exclusively on the
identity equality of its Thread field so that the task field is only accessed by a single
thread.
|
FakeTimeLimiter |
A TimeLimiter implementation which actually does not attempt to limit time at all.
|
FluentFuture<V> |
A
ListenableFuture that supports fluent chains of operations. |
FluentFuture.TrustedFuture<V> |
A less abstract subclass of AbstractFuture.
|
ForwardingBlockingDeque<E> |
A
BlockingDeque which forwards all its method calls to another BlockingDeque . |
ForwardingBlockingQueue<E> |
A
BlockingQueue which forwards all its method calls to another BlockingQueue . |
ForwardingCondition |
Forwarding wrapper around a
Condition . |
ForwardingExecutorService |
An executor service which forwards all its method calls to another executor service.
|
ForwardingFluentFuture<V> |
FluentFuture that forwards all calls to a delegate. |
ForwardingFuture<V> |
A
Future which forwards all its method calls to another future. |
ForwardingFuture.SimpleForwardingFuture<V> |
A simplified version of
ForwardingFuture where subclasses can pass in an already
constructed Future as the delegate. |
ForwardingListenableFuture<V> |
A
ListenableFuture which forwards all its method calls to another future. |
ForwardingListenableFuture.SimpleForwardingListenableFuture<V> |
A simplified version of
ForwardingListenableFuture where subclasses can pass in an
already constructed ListenableFuture as the delegate. |
ForwardingListeningExecutorService |
A listening executor service which forwards all its method calls to another listening executor
service.
|
ForwardingLock |
Forwarding wrapper around a
Lock . |
Futures |
Static utility methods pertaining to the
Future interface. |
Futures.CallbackListener<V> |
See
Futures.addCallback(ListenableFuture, FutureCallback, Executor) for behavioral notes. |
Futures.FutureCombiner<V> |
A helper to create a new
ListenableFuture whose result is generated from a combination
of input futures. |
Futures.InCompletionOrderFuture<T> | |
Futures.InCompletionOrderState<T> | |
Futures.NonCancellationPropagatingFuture<V> |
A wrapped future that does not propagate cancellation to its delegate.
|
FuturesGetChecked |
Static methods used to implement
Futures.getChecked(Future, Class) . |
FuturesGetChecked.GetCheckedTypeValidatorHolder |
Provides a check of whether an exception type is valid for use with
FuturesGetChecked.getChecked(Future, Class) , possibly using caching. |
GwtFluentFutureCatchingSpecialization<V> |
Hidden superclass of
FluentFuture that provides us a place to declare special GWT
versions of the FluentFuture.catching family of methods. |
GwtFuturesCatchingSpecialization |
Hidden superclass of
Futures that provides us a place to declare special GWT versions of
the Futures.catching family of methods. |
ImmediateFuture<V> |
Implementation of
Futures.immediateFuture(V) . |
ImmediateFuture.ImmediateCancelledFuture<V> | |
ImmediateFuture.ImmediateFailedFuture<V> | |
Internal |
This class is for
com.google.common.util.concurrent use only! |
InterruptibleTask<T> | |
InterruptibleTask.Blocker |
Using this as the blocker object allows introspection and debugging tools to see that the
currentRunner thread is blocked on the progress of the interruptor thread, which can help
identify deadlocks.
|
InterruptibleTask.DoNothingRunnable | |
JdkFutureAdapters |
Utilities necessary for working with libraries that supply plain
Future instances. |
JdkFutureAdapters.ListenableFutureAdapter<V> |
An adapter to turn a
Future into a ListenableFuture . |
ListenableFutureTask<V> |
A
FutureTask that also implements the ListenableFuture interface. |
ListenerCallQueue<L> |
A list of listeners for implementing a concurrency friendly observable object.
|
ListenerCallQueue.PerListenerQueue<L> |
A special purpose queue/executor that dispatches listener events serially on a configured
executor.
|
Monitor |
A synchronization abstraction supporting waiting on arbitrary boolean conditions.
|
Monitor.Guard |
A boolean condition for which a thread may wait.
|
MoreExecutors |
Factory and utility methods for
Executor , ExecutorService ,
and ThreadFactory . |
MoreExecutors.Application |
Represents the current application to register shutdown hooks.
|
MoreExecutors.DirectExecutorService | |
MoreExecutors.ListeningDecorator | |
MoreExecutors.ScheduledListeningDecorator | |
MoreExecutors.ScheduledListeningDecorator.ListenableScheduledTask<V> | |
MoreExecutors.ScheduledListeningDecorator.NeverSuccessfulListenableFutureTask | |
NullnessCasts |
A utility method to perform unchecked casts to suppress errors produced by nullness analyses.
|
OverflowAvoidingLockSupport |
Works around an android bug, where parking for more than INT_MAX seconds can produce an abort
signal on 32 bit devices running Android Q.
|
Partially |
Outer class that exists solely to let us write
Partially.GwtIncompatible instead of plain
GwtIncompatible . |
Platform |
Methods factored out so that they can be emulated differently in GWT.
|
RateLimiter |
A rate limiter.
|
RateLimiter.SleepingStopwatch | |
Runnables |
Static utility methods pertaining to the
Runnable interface. |
SequentialExecutor |
Executor ensuring that all Runnables submitted are executed in order, using the provided
Executor, and sequentially such that no two will ever be running at the same time.
|
Service.Listener |
A listener for the various state changes that a
Service goes through in its lifecycle. |
ServiceManager |
A manager for monitoring and controlling a set of services.
|
ServiceManager.EmptyServiceManagerWarning |
This is never thrown but only used for logging.
|
ServiceManager.FailedService | |
ServiceManager.Listener |
A listener for the aggregate state changes of the services that are under management.
|
ServiceManager.NoOpService |
A
Service instance that does nothing. |
ServiceManager.ServiceListener |
A
Service that wraps another service and times how long it takes for it to start and
also calls the ServiceManagerState#transitionService(Service, State, State) , to record
the state transitions. |
ServiceManager.ServiceManagerState |
An encapsulation of all the mutable state of the
ServiceManager that needs to be
accessed by instances of ServiceManager.ServiceListener . |
SettableFuture<V> |
A
ListenableFuture whose result can be set by a SettableFuture.set(Object) , SettableFuture.setException(Throwable) or SettableFuture.setFuture(ListenableFuture) call. |
SimpleTimeLimiter |
A TimeLimiter that runs method calls in the background using an
ExecutorService . |
SmoothRateLimiter | |
SmoothRateLimiter.SmoothBursty |
This implements a "bursty" RateLimiter, where storedPermits are translated to zero throttling.
|
SmoothRateLimiter.SmoothWarmingUp |
This implements the following function where coldInterval = coldFactor * stableInterval.
|
Striped<L> |
A striped
Lock/Semaphore/ReadWriteLock . |
Striped.CompactStriped<L> |
Implementation of Striped where 2^k stripes are represented as an array of the same length,
eagerly initialized.
|
Striped.LargeLazyStriped<L> |
Implementation of Striped where up to 2^k stripes can be represented, using a ConcurrentMap
where the key domain is [0..2^k).
|
Striped.PaddedLock | |
Striped.PaddedSemaphore | |
Striped.PowerOfTwoStriped<L> | |
Striped.SmallLazyStriped<L> |
Implementation of Striped where up to 2^k stripes can be represented, using an
AtomicReferenceArray of size 2^k.
|
Striped.SmallLazyStriped.ArrayReference<L> | |
Striped.WeakSafeCondition |
Condition object that ensures a strong reference is retained to a specified object.
|
Striped.WeakSafeLock |
Lock object that ensures a strong reference is retained to a specified object.
|
Striped.WeakSafeReadWriteLock |
ReadWriteLock implementation whose read and write locks retain a reference back to this lock.
|
ThreadFactoryBuilder |
A ThreadFactory builder, providing any combination of these features:
whether threads should be marked as daemon threads
a naming format
a thread priority
an uncaught exception handler
a backing thread factory
|
TimeoutFuture<V> |
Implementation of
Futures#withTimeout . |
TimeoutFuture.Fire<V> |
A runnable that is called when the delegate or the timer completes.
|
TrustedListenableFutureTask<V> |
A
RunnableFuture that also implements the ListenableFuture interface. |
UncaughtExceptionHandlers |
Factories for
Thread.UncaughtExceptionHandler instances. |
UncaughtExceptionHandlers.Exiter | |
Uninterruptibles |
Utilities for treating interruptible operations as uninterruptible.
|
WrappingExecutorService |
An abstract
ExecutorService that allows subclasses to wrap tasks before they are submitted to the underlying executor. |
WrappingScheduledExecutorService |
An abstract
ScheduledExecutorService that allows subclasses to wrap tasks before they are submitted to the underlying executor. |
Enum | Description |
---|---|
AggregateFuture.ReleaseResourcesReason | |
ClosingFuture.State |
The state of a
ClosingFuture.CloseableList . |
CycleDetectingLockFactory.Policies |
Pre-defined
CycleDetectingLockFactory.Policy implementations. |
DirectExecutor |
An
Executor that runs each task in the thread that invokes execute . |
ExecutionSequencer.RunningState | |
FuturesGetChecked.GetCheckedTypeValidatorHolder.ClassValueValidator | |
FuturesGetChecked.GetCheckedTypeValidatorHolder.WeakSetValidator | |
SequentialExecutor.WorkerRunningState | |
Service.State |
The lifecycle states of a service.
|
Exception | Description |
---|---|
CycleDetectingLockFactory.ExampleStackTrace |
A Throwable used to record a stack trace that illustrates an example of a specific lock
acquisition ordering.
|
CycleDetectingLockFactory.PotentialDeadlockException |
Represents a detected cycle in lock acquisition ordering.
|
TimeoutFuture.TimeoutFutureException | |
UncheckedExecutionException |
Unchecked variant of
ExecutionException . |
UncheckedTimeoutException |
Unchecked version of
TimeoutException . |
Error | Description |
---|---|
ExecutionError |
Error variant of ExecutionException . |
Annotation Type | Description |
---|---|
ElementTypesAreNonnullByDefault |
Marks all "top-level" types as non-null in a way that is recognized by Kotlin.
|
ParametricNullness |
Marks a "top-level" type-variable usage as the closest we can get to "non-nullable when
non-nullable; nullable when nullable" (like the Android
NullFromTypeParam ). |
Partially.GwtIncompatible |
The presence of this annotation on an API indicates that the method may be used with the
Google Web Toolkit (GWT) but that it has some
restrictions.
|
Commonly used types include ListenableFuture
and
Service
.
Commonly used utilities include Futures
, MoreExecutors
, and ThreadFactoryBuilder
.
This package is a part of the open-source Guava library.