Class ClosingFuture.Peeker
- java.lang.Object
-
- com.google.common.util.concurrent.ClosingFuture.Peeker
-
- Enclosing class:
- ClosingFuture<V extends @Nullable Object>
public static final class ClosingFuture.Peeker extends Object
An object that can return the value of theClosingFuture
s that are passed toClosingFuture.whenAllComplete(Iterable)
orClosingFuture.whenAllSucceed(Iterable)
.Only for use by a
ClosingFuture.Combiner.CombiningCallable
orClosingFuture.Combiner.AsyncCombiningCallable
object.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <D extends @Nullable Object>
DgetDone(ClosingFuture<D> closingFuture)
Returns the value ofclosingFuture
.
-
-
-
Method Detail
-
getDone
public final <D extends @Nullable Object> D getDone(ClosingFuture<D> closingFuture) throws ExecutionException
Returns the value ofclosingFuture
.- Throws:
ExecutionException
- ifclosingFuture
is a failed stepCancellationException
- if theclosingFuture
's future was cancelledIllegalArgumentException
- ifclosingFuture
is not one of the futures passed toClosingFuture.whenAllComplete(Iterable)
orClosingFuture.whenAllComplete(Iterable)
IllegalStateException
- if called outside of a call toClosingFuture.Combiner.CombiningCallable.call(DeferredCloser, Peeker)
orClosingFuture.Combiner.AsyncCombiningCallable.call(DeferredCloser, Peeker)
-
-