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

pack-priv abstract Class CollectionFuture<V extends @Nullable Object, C extends @Nullable Object>

extends AggregateFuture<V extends @Nullable Object, C extends @Nullable Object>
Class Inheritance
Known Direct Subclasses
com.google.common.util.concurrent.CollectionFuture.ListFuture
Annotations
@GwtCompatible
emulated:true
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.collect.Lists.newArrayListWithCapacity, java.util.Collections.unmodifiableList

Aggregate future that collects (stores) results of each future.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
private static class
CollectionFuture.Present<V extends @Nullable Object>

The result of a successful Future.

Field Summary

Modifier and TypeField and Description
private List<@Nullable CollectionFuture.Present<V>>

Constructor Summary

AccessConstructor and Description
pack-priv
CollectionFuture(ImmutableCollection<? extends ListenableFuture<? extends V>> futures, boolean allMustSucceed)

Method Summary

Modifier and TypeMethod and Description
pack-priv final void
collectOneValue(int index, V returnValue)

Implements abstract com.google.common.util.concurrent.AggregateFuture.collectOneValue.

If allMustSucceed is true, called as each future completes; otherwise, if collectsValues is true, called for each future when all futures complete.
pack-priv abstract C
pack-priv final void
pack-priv void
releaseResources(AggregateFuture.ReleaseResourcesReason reason)

Overrides com.google.common.util.concurrent.AggregateFuture.releaseResources.

Clears fields that are no longer needed after this future has completed -- or at least all its inputs have completed (more precisely, after handleAllCompleted() has been called).
Inherited from com.google.common.util.concurrent.AggregateFuture:
addInitialExceptionafterDoneinitpendingToString

Field Detail

valuesback to summary
private List<@Nullable CollectionFuture.Present<V>> values
Annotations
@CheckForNull

Constructor Detail

CollectionFutureback to summary
pack-priv CollectionFuture(ImmutableCollection<? extends ListenableFuture<? extends V>> futures, boolean allMustSucceed)

Method Detail

collectOneValueback to summary
pack-priv final void collectOneValue(int index, V returnValue)

Implements abstract com.google.common.util.concurrent.AggregateFuture.collectOneValue.

Doc from com.google.common.util.concurrent.AggregateFuture.collectOneValue.

If allMustSucceed is true, called as each future completes; otherwise, if collectsValues is true, called for each future when all futures complete.

Annotations
@Override
combineback to summary
pack-priv abstract C combine(List<@Nullable CollectionFuture.Present<V>> values)
handleAllCompletedback to summary
pack-priv final void handleAllCompleted()

Implements abstract com.google.common.util.concurrent.AggregateFuture.handleAllCompleted.

Annotations
@Override
releaseResourcesback to summary
pack-priv void releaseResources(AggregateFuture.ReleaseResourcesReason reason)

Overrides com.google.common.util.concurrent.AggregateFuture.releaseResources.

Doc from com.google.common.util.concurrent.AggregateFuture.releaseResources.

Clears fields that are no longer needed after this future has completed -- or at least all its inputs have completed (more precisely, after 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.

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

pack-priv final Class CollectionFuture.ListFuture<V extends @Nullable Object>

extends CollectionFuture<V extends @Nullable Object, List<@Nullable V extends @Nullable Object>>
Class Inheritance

Used for Futures#allAsList and Futures#successfulAsList.

Constructor Summary

AccessConstructor and Description
pack-priv
ListFuture(ImmutableCollection<? extends ListenableFuture<? extends V>> futures, boolean allMustSucceed)

Method Summary

Modifier and TypeMethod and Description
public List<@Nullable V>
Inherited from com.google.common.util.concurrent.CollectionFuture:
collectOneValuehandleAllCompletedreleaseResources

Constructor Detail

ListFutureback to summary
pack-priv ListFuture(ImmutableCollection<? extends ListenableFuture<? extends V>> futures, boolean allMustSucceed)

Method Detail

combineback to summary
public List<@Nullable V> combine(List<@Nullable CollectionFuture.Present<V>> values)

Implements abstract com.google.common.util.concurrent.CollectionFuture.combine.

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

private final Class CollectionFuture.Present<V extends @Nullable Object>

extends Object
Class Inheritance

The result of a successful Future.

Field Summary

Modifier and TypeField and Description
pack-priv final V

Constructor Summary

AccessConstructor and Description
pack-priv
Present(V value)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

valueback to summary
pack-priv final V value
Annotations
@ParametricNullness

Constructor Detail

Presentback to summary
pack-priv Present(V value)