Uses of Class
com.google.common.util.concurrent.FluentFuture
-
Uses of FluentFuture in com.google.common.util.concurrent
Modifier and TypeMethodDescriptionfinal <X extends Throwable>
FluentFuture<V> FluentFuture.catching
(Class<X> exceptionType, Function<? 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
.final <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
.ClosingFuture.finishToFuture()
Marks this step as the last step in theClosingFuture
pipeline.static <V extends @Nullable Object>
FluentFuture<V> FluentFuture.from
(FluentFuture<V> future) Deprecated.no need to use thisstatic <V extends @Nullable Object>
FluentFuture<V> FluentFuture.from
(ListenableFuture<V> future) Converts the givenListenableFuture
to an equivalentFluentFuture
.final <T extends @Nullable Object>
FluentFuture<T> Returns a newFuture
whose result is derived from the result of thisFuture
.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
.final FluentFuture
<V> FluentFuture.withTimeout
(long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to this future but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified timeout expires.final FluentFuture
<V> FluentFuture.withTimeout
(Duration timeout, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to this future but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified timeout expires.Modifier and TypeMethodDescriptionstatic <V extends @Nullable Object>
FluentFuture<V> FluentFuture.from
(FluentFuture<V> future) Deprecated.no need to use this