final class CombinedFuture<V> extends AggregateFuture<java.lang.Object,V>
| Modifier and Type | Class and Description |
|---|---|
private class |
CombinedFuture.AsyncCallableInterruptibleTask |
private class |
CombinedFuture.CallableInterruptibleTask |
private class |
CombinedFuture.CombinedFutureInterruptibleTask<T> |
AggregateFuture.ReleaseResourcesReasonAbstractFuture.Trusted<V>, AbstractFuture.TrustedFuture<V>| Modifier and Type | Field and Description |
|---|---|
private CombinedFuture.CombinedFutureInterruptibleTask<?> |
task |
GENERATE_CANCELLATION_CAUSES| Constructor and Description |
|---|
CombinedFuture(ImmutableCollection<? extends ListenableFuture<?>> futures,
boolean allMustSucceed,
java.util.concurrent.Executor listenerExecutor,
AsyncCallable<V> callable) |
CombinedFuture(ImmutableCollection<? extends ListenableFuture<?>> futures,
boolean allMustSucceed,
java.util.concurrent.Executor listenerExecutor,
java.util.concurrent.Callable<V> callable) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
collectOneValue(int index,
java.lang.Object returnValue)
If
allMustSucceed is true, called as each future completes; otherwise, if collectsValues is true, called for each future when all futures complete. |
(package private) void |
handleAllCompleted() |
protected void |
interruptTask()
Subclasses can override this method to implement interruption of the future's computation.
|
(package private) void |
releaseResources(AggregateFuture.ReleaseResourcesReason reason)
Clears fields that are no longer needed after this future has completed -- or at least all its
inputs have completed (more precisely, after
AggregateFuture.handleAllCompleted() has been called). |
addInitialException, afterDone, init, pendingToStringclearSeenExceptions, decrementRemainingAndGet, getOrInitSeenExceptionsaddListener, cancel, get, get, isCancelled, isDonemaybePropagateCancellationTo, set, setException, setFuture, toString, tryInternalFastPathGetFailure, wasInterrupted@CheckForNull private CombinedFuture.CombinedFutureInterruptibleTask<?> task
CombinedFuture(ImmutableCollection<? extends ListenableFuture<?>> futures, boolean allMustSucceed, java.util.concurrent.Executor listenerExecutor, AsyncCallable<V> callable)
CombinedFuture(ImmutableCollection<? extends ListenableFuture<?>> futures, boolean allMustSucceed, java.util.concurrent.Executor listenerExecutor, java.util.concurrent.Callable<V> callable)
void collectOneValue(int index,
@CheckForNull
java.lang.Object returnValue)
AggregateFutureallMustSucceed is true, called as each future completes; otherwise, if collectsValues is true, called for each future when all futures complete.collectOneValue in class AggregateFuture<java.lang.Object,V>void handleAllCompleted()
handleAllCompleted in class AggregateFuture<java.lang.Object,V>void releaseResources(AggregateFuture.ReleaseResourcesReason reason)
AggregateFutureAggregateFuture.handleAllCompleted() has been called).
Often called multiple times (that is, both when the inputs complete and when the output
completes).
This is similar to our proposed afterCommit method but not quite the same. See the
description of CL 265462958.
releaseResources in class AggregateFuture<java.lang.Object,V>protected void interruptTask()
AbstractFuturecancel(true).
The default implementation does nothing.
This method is likely to be deprecated. Prefer to override AbstractFuture.afterDone(), checking
AbstractFuture.wasInterrupted() to decide whether to interrupt your task.
interruptTask in class AbstractFuture<V>