Class ClosingFuture.Peeker
java.lang.Object
com.google.common.util.concurrent.ClosingFuture.Peeker
- Enclosing class:
ClosingFuture<V>
An object that can return the value of the
ClosingFuture
s that are passed to ClosingFuture.whenAllComplete(Iterable)
or ClosingFuture.whenAllSucceed(Iterable)
.
Only for use by a ClosingFuture.Combiner.CombiningCallable
or ClosingFuture.Combiner.AsyncCombiningCallable
object.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate <V> V
call
(ClosingFuture.Combiner.CombiningCallable<V> combiner, ClosingFuture.CloseableList closeables) private <V> FluentFuture
<V> callAsync
(ClosingFuture.Combiner.AsyncCombiningCallable<V> combiner, ClosingFuture.CloseableList closeables) final <D> D
getDone
(ClosingFuture<D> closingFuture) Returns the value ofclosingFuture
.
-
Field Details
-
futures
-
beingCalled
private volatile boolean beingCalled
-
-
Constructor Details
-
Peeker
-
-
Method Details
-
getDone
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)
-
call
private <V> V call(ClosingFuture.Combiner.CombiningCallable<V> combiner, ClosingFuture.CloseableList closeables) throws Exception - Throws:
Exception
-
callAsync
private <V> FluentFuture<V> callAsync(ClosingFuture.Combiner.AsyncCombiningCallable<V> combiner, ClosingFuture.CloseableList closeables) throws Exception - Throws:
Exception
-