Class AggregateFutureState<OutputT>
java.lang.Object
com.google.common.util.concurrent.internal.InternalFutureFailureAccess
com.google.common.util.concurrent.AbstractFuture<OutputT>
com.google.common.util.concurrent.AbstractFuture.TrustedFuture<OutputT>
com.google.common.util.concurrent.AggregateFutureState<OutputT>
- All Implemented Interfaces:
AbstractFuture.Trusted<OutputT>
,ListenableFuture<OutputT>
,Future<OutputT>
- Direct Known Subclasses:
AggregateFuture
A helper which does some thread-safe operations for aggregate futures, which must be implemented
differently in GWT. Namely:
- Lazily initializes a set of seen exceptions
- Decrements a counter atomically
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static final class
private static final class
Nested classes/interfaces inherited from class com.google.common.util.concurrent.AbstractFuture
AbstractFuture.Trusted<V>, AbstractFuture.TrustedFuture<V>
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AggregateFutureState.AtomicHelper
private static final LazyLogger
private int
Fields inherited from class com.google.common.util.concurrent.AbstractFuture
GENERATE_CANCELLATION_CAUSES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract void
addInitialException
(Set<Throwable> seen) Populatesseen
with the exception that was passed tosetException
.(package private) final void
(package private) final int
Methods inherited from class com.google.common.util.concurrent.AbstractFuture.TrustedFuture
addListener, cancel, get, get, isCancelled, isDone
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
afterDone, interruptTask, maybePropagateCancellationTo, pendingToString, set, setException, setFuture, toString, tryInternalFastPathGetFailure, wasInterrupted
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Field Details
-
seenExceptions
-
remaining
private volatile int remaining -
ATOMIC_HELPER
-
log
-
-
Constructor Details
-
AggregateFutureState
AggregateFutureState(int remainingFutures)
-
-
Method Details
-
getOrInitSeenExceptions
-
addInitialException
Populatesseen
with the exception that was passed tosetException
. -
decrementRemainingAndGet
final int decrementRemainingAndGet() -
clearSeenExceptions
final void clearSeenExceptions()
-