Class AggregateFutureState<OutputT>
java.lang.Object
com.google.common.util.concurrent.internal.InternalFutureFailureAccess
com.google.common.util.concurrent.AbstractFuture<V>
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
@GwtCompatible(emulated=true)
abstract class AggregateFutureState<OutputT>
extends AbstractFuture.TrustedFuture<OutputT>
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>
-
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
-
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()
-