Uses of Interface
dev.mccue.guava.concurrent.AsyncFunction
-
Uses of AsyncFunction in dev.mccue.guava.concurrent
Methods in dev.mccue.guava.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 extends @Nullable Object,
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
.final <T extends @Nullable Object>
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 extends @Nullable Object,
O extends @Nullable Object>
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 extends @Nullable Object,
U extends @Nullable Object>
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
.