Class AggregateFutureState
- java.lang.Object
-
- com.google.common.util.concurrent.AggregateFutureState
-
- Direct Known Subclasses:
AggregateFuture.RunningState
@GwtCompatible(emulated=true) abstract class AggregateFutureState extends java.lang.Object
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 Classes Modifier and Type Class Description private static classAggregateFutureState.AtomicHelperprivate static classAggregateFutureState.SafeAtomicHelperprivate static classAggregateFutureState.SynchronizedAtomicHelper
-
Field Summary
Fields Modifier and Type Field Description private static AggregateFutureState.AtomicHelperATOMIC_HELPERprivate static java.util.logging.Loggerlogprivate intremainingprivate java.util.Set<java.lang.Throwable>seenExceptions
-
Constructor Summary
Constructors Constructor Description AggregateFutureState(int remainingFutures)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract voidaddInitialException(java.util.Set<java.lang.Throwable> seen)Populatesseenwith the exception that was passed tosetException.(package private) intdecrementRemainingAndGet()(package private) java.util.Set<java.lang.Throwable>getOrInitSeenExceptions()
-
-
-
Field Detail
-
seenExceptions
private volatile java.util.Set<java.lang.Throwable> seenExceptions
-
remaining
private volatile int remaining
-
ATOMIC_HELPER
private static final AggregateFutureState.AtomicHelper ATOMIC_HELPER
-
log
private static final java.util.logging.Logger log
-
-
Method Detail
-
getOrInitSeenExceptions
final java.util.Set<java.lang.Throwable> getOrInitSeenExceptions()
-
addInitialException
abstract void addInitialException(java.util.Set<java.lang.Throwable> seen)
Populatesseenwith the exception that was passed tosetException.
-
decrementRemainingAndGet
final int decrementRemainingAndGet()
-
-