Top Description Inners Fields Constructors Methods
com.google.common.util.concurrent

pack-priv abstract Class AggregateFutureState<OutputT extends @Nullable Object>

extends AbstractFuture.TrustedFuture<OutputT extends @Nullable Object>
Class Inheritance
Known Direct Subclasses
com.google.common.util.concurrent.AggregateFuture
Annotations
@GwtCompatible
emulated:true
@ReflectionSupport:FULL
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.collect.Sets.newConcurrentHashSet, java.util.Objects.requireNonNull, java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater, .AtomicReferenceFieldUpdater.newUpdater

A helper which does some thread-safe operations for aggregate futures, which must be implemented differently in GWT. Namely:

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final AggregateFutureState.AtomicHelper
private static final Logger
private volatile int
private volatile Set<Throwable>

Constructor Summary

AccessConstructor and Description
pack-priv
AggregateFutureState(int remainingFutures)

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract void
addInitialException(Set<Throwable> seen)

Populates seen with the exception that was passed to setException.

pack-priv final void
pack-priv final int
pack-priv final Set<Throwable>
Inherited from com.google.common.util.concurrent.AbstractFuture.TrustedFuture:
addListenercancelgetgetisCancelledisDone

Field Detail

ATOMIC_HELPERback to summary
private static final AggregateFutureState.AtomicHelper ATOMIC_HELPER

Hides com.google.common.util.concurrent.AbstractFuture.ATOMIC_HELPER.

logback to summary
private static final Logger log

Hides com.google.common.util.concurrent.AbstractFuture.log.

remainingback to summary
private volatile int remaining
seenExceptionsback to summary
private volatile Set<Throwable> seenExceptions
Annotations
@CheckForNull

Constructor Detail

AggregateFutureStateback to summary
pack-priv AggregateFutureState(int remainingFutures)

Method Detail

addInitialExceptionback to summary
pack-priv abstract void addInitialException(Set<Throwable> seen)

Populates seen with the exception that was passed to setException.

clearSeenExceptionsback to summary
pack-priv final void clearSeenExceptions()
decrementRemainingAndGetback to summary
pack-priv final int decrementRemainingAndGet()
getOrInitSeenExceptionsback to summary
pack-priv final Set<Throwable> getOrInitSeenExceptions()
com.google.common.util.concurrent back to summary

private abstract Class AggregateFutureState.AtomicHelper

extends Object
Class Inheritance
  • java.lang.Object
  • com.google.common.util.concurrent.AggregateFutureState.AtomicHelper
Known Direct Subclasses
com.google.common.util.concurrent.AggregateFutureState.SafeAtomicHelper, com.google.common.util.concurrent.AggregateFutureState.SynchronizedAtomicHelper

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract void
compareAndSetSeenExceptions(AggregateFutureState<?> state, Set<Throwable> expect, Set<Throwable> update)

Atomic compare-and-set of the AggregateFutureState#seenExceptions field.

pack-priv abstract int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AtomicHelperback to summary
private AtomicHelper()

Method Detail

compareAndSetSeenExceptionsback to summary
pack-priv abstract void compareAndSetSeenExceptions(AggregateFutureState<?> state, Set<Throwable> expect, Set<Throwable> update)

Atomic compare-and-set of the AggregateFutureState#seenExceptions field.

decrementAndGetRemainingCountback to summary
pack-priv abstract int decrementAndGetRemainingCount(AggregateFutureState<?> state)

Atomic decrement-and-get of the AggregateFutureState#remaining field.

com.google.common.util.concurrent back to summary

private final Class AggregateFutureState.SafeAtomicHelper

extends AtomicHelper
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final AtomicIntegerFieldUpdater<AggregateFutureState<?>>
pack-priv final AtomicReferenceFieldUpdater<AggregateFutureState<?>, Set<Throwable>>

Constructor Summary

AccessConstructor and Description
pack-priv
SafeAtomicHelper(AtomicReferenceFieldUpdater<T, V> seenExceptionsUpdater, AtomicIntegerFieldUpdater<T> remainingCountUpdater)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv int

Field Detail

remainingCountUpdaterback to summary
pack-priv final AtomicIntegerFieldUpdater<AggregateFutureState<?>> remainingCountUpdater
seenExceptionsUpdaterback to summary
pack-priv final AtomicReferenceFieldUpdater<AggregateFutureState<?>, Set<Throwable>> seenExceptionsUpdater

Constructor Detail

SafeAtomicHelperback to summary
pack-priv SafeAtomicHelper(AtomicReferenceFieldUpdater<T, V> seenExceptionsUpdater, AtomicIntegerFieldUpdater<T> remainingCountUpdater)
Annotations
@SuppressWarnings:rawtypes, unchecked

Method Detail

compareAndSetSeenExceptionsback to summary
pack-priv void compareAndSetSeenExceptions(AggregateFutureState<?> state, Set<Throwable> expect, Set<Throwable> update)

Implements abstract com.google.common.util.concurrent.AggregateFutureState.AtomicHelper.compareAndSetSeenExceptions.

Doc from com.google.common.util.concurrent.AggregateFutureState.AtomicHelper.compareAndSetSeenExceptions.

Atomic compare-and-set of the AggregateFutureState#seenExceptions field.

Annotations
@Override
decrementAndGetRemainingCountback to summary
pack-priv int decrementAndGetRemainingCount(AggregateFutureState<?> state)

Implements abstract com.google.common.util.concurrent.AggregateFutureState.AtomicHelper.decrementAndGetRemainingCount.

Doc from com.google.common.util.concurrent.AggregateFutureState.AtomicHelper.decrementAndGetRemainingCount.

Atomic decrement-and-get of the AggregateFutureState#remaining field.

Annotations
@Override
com.google.common.util.concurrent back to summary

private final Class AggregateFutureState.SynchronizedAtomicHelper

extends AtomicHelper
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv int

Constructor Detail

SynchronizedAtomicHelperback to summary
private SynchronizedAtomicHelper()

Method Detail

compareAndSetSeenExceptionsback to summary
pack-priv void compareAndSetSeenExceptions(AggregateFutureState<?> state, Set<Throwable> expect, Set<Throwable> update)

Implements abstract com.google.common.util.concurrent.AggregateFutureState.AtomicHelper.compareAndSetSeenExceptions.

Doc from com.google.common.util.concurrent.AggregateFutureState.AtomicHelper.compareAndSetSeenExceptions.

Atomic compare-and-set of the AggregateFutureState#seenExceptions field.

Annotations
@Override
decrementAndGetRemainingCountback to summary
pack-priv int decrementAndGetRemainingCount(AggregateFutureState<?> state)

Implements abstract com.google.common.util.concurrent.AggregateFutureState.AtomicHelper.decrementAndGetRemainingCount.

Doc from com.google.common.util.concurrent.AggregateFutureState.AtomicHelper.decrementAndGetRemainingCount.

Atomic decrement-and-get of the AggregateFutureState#remaining field.

Annotations
@Override