-
@GwtCompatible public interface AsyncCallable<V extends @Nullable Object>
Computes a value, possibly asynchronously. For an example usage and more information, seeFutures.FutureCombiner.callAsync(AsyncCallable, java.util.concurrent.Executor)
.Much like
Callable
, but returning aListenableFuture
result.- Since:
- 20.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ListenableFuture<V>
call()
Computes a resultFuture
.
-
-
-
Method Detail
-
call
ListenableFuture<V> call() throws Exception
Computes a resultFuture
. The outputFuture
need not be done, makingAsyncCallable
suitable for asynchronous derivations.Throwing an exception from this method is equivalent to returning a failing
ListenableFuture
.- Throws:
Exception
-
-