Uses of Interface
com.google.common.util.concurrent.AsyncFunction
Packages that use AsyncFunction
-
Uses of AsyncFunction in com.google.common.util.concurrent
Methods in com.google.common.util.concurrent with parameters of type AsyncFunctionModifier and TypeMethodDescriptionfinal <X extends Throwable>
FluentFuture<V> FluentFuture.catchingAsync
(Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) Returns aFuture
whose result is taken from thisFuture
or, if thisFuture
fails with the givenexceptionType
, from the result provided by thefallback
.static <V,
X extends Throwable>
ListenableFuture<V> Futures.catchingAsync
(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) Returns aFuture
whose result is taken from the given primaryinput
or, if the primary input fails with the givenexceptionType
, from the result provided by thefallback
.(package private) static <X extends Throwable,
V>
ListenableFuture<V> AbstractCatchingFuture.createAsync
(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) (package private) static <I,
O> ListenableFuture <O> AbstractTransformFuture.createAsync
(ListenableFuture<I> input, AsyncFunction<? super I, ? extends O> function, Executor executor) (package private) ListenableFuture
<? extends V> AbstractCatchingFuture.AsyncCatchingFuture.doFallback
(AsyncFunction<? super X, ? extends V> fallback, X cause) (package private) ListenableFuture
<? extends O> AbstractTransformFuture.AsyncTransformFuture.doTransform
(AsyncFunction<? super I, ? extends O> function, I input) final <T> FluentFuture
<T> FluentFuture.transformAsync
(AsyncFunction<? super V, T> function, Executor executor) Returns a newFuture
whose result is asynchronously derived from the result of thisFuture
.static <I,
O> ListenableFuture <O> Futures.transformAsync
(ListenableFuture<I> input, AsyncFunction<? super I, ? extends O> function, Executor executor) Returns a newFuture
whose result is asynchronously derived from the result of the givenFuture
.static <V,
U> ClosingFuture.AsyncClosingFunction <V, U> ClosingFuture.withoutCloser
(AsyncFunction<V, U> function) Returns anClosingFuture.AsyncClosingFunction
that applies anAsyncFunction
to an input, ignoring the DeferredCloser and returning aClosingFuture
derived from the returnedListenableFuture
.Constructors in com.google.common.util.concurrent with parameters of type AsyncFunctionModifierConstructorDescription(package private)
AsyncCatchingFuture
(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback) (package private)
AsyncTransformFuture
(ListenableFuture<? extends I> inputFuture, AsyncFunction<? super I, ? extends O> function)