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 classprivate static final classprivate static final classNested 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.AtomicHelperprivate static final LazyLoggerprivate intFields inherited from class com.google.common.util.concurrent.AbstractFuture
GENERATE_CANCELLATION_CAUSES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract voidaddInitialException(Set<Throwable> seen) Populatesseenwith the exception that was passed tosetException.(package private) final void(package private) final intMethods inherited from class com.google.common.util.concurrent.AbstractFuture.TrustedFuture
addListener, cancel, get, get, isCancelled, isDoneMethods inherited from class com.google.common.util.concurrent.AbstractFuture
afterDone, interruptTask, maybePropagateCancellationTo, pendingToString, set, setException, setFuture, toString, tryInternalFastPathGetFailure, wasInterruptedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
Populatesseenwith the exception that was passed tosetException. -
decrementRemainingAndGet
final int decrementRemainingAndGet() -
clearSeenExceptions
final void clearSeenExceptions()
-