Class AggregateFutureState<OutputT>

  • All Implemented Interfaces:
    AbstractFuture.Trusted<OutputT>, ListenableFuture<OutputT>, java.util.concurrent.Future<OutputT>
    Direct Known Subclasses:
    AggregateFuture

    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
    • Field Detail

      • seenExceptions

        @CheckForNull
        private volatile java.util.Set<java.lang.Throwable> seenExceptions
      • remaining

        private volatile int remaining
      • log

        private static final java.util.logging.Logger log
    • Constructor Detail

      • AggregateFutureState

        AggregateFutureState​(int remainingFutures)
    • Method Detail

      • getOrInitSeenExceptions

        final java.util.Set<java.lang.Throwable> getOrInitSeenExceptions()
      • addInitialException

        abstract void addInitialException​(java.util.Set<java.lang.Throwable> seen)
        Populates seen with the exception that was passed to setException.
      • decrementRemainingAndGet

        final int decrementRemainingAndGet()
      • clearSeenExceptions

        final void clearSeenExceptions()