| Package | Description |
|---|---|
| com.google.common.util.concurrent |
Concurrency utilities.
|
| Modifier and Type | Method and Description |
|---|---|
<X extends java.lang.Throwable> |
FluentFuture.catching(java.lang.Class<X> exceptionType,
Function<? super X,? extends V> fallback,
java.util.concurrent.Executor executor)
Returns a
Future whose result is taken from this Future or, if this Future fails with the given exceptionType, from the result provided by the fallback. |
static <V,X extends java.lang.Throwable> |
Futures.catching(ListenableFuture<? extends V> input,
java.lang.Class<X> exceptionType,
Function<? super X,? extends V> fallback)
Deprecated.
Use the overload
that requires an executor. For identical behavior, pass
MoreExecutors.directExecutor(), but consider whether another executor would be safer, as
discussed in the ListenableFuture.addListener
documentation. This method is scheduled to be removed in July 2018. |
static <V,X extends java.lang.Throwable> |
Futures.catching(ListenableFuture<? extends V> input,
java.lang.Class<X> exceptionType,
Function<? super X,? extends V> fallback,
java.util.concurrent.Executor executor)
Returns a
Future whose result is taken from the given primary input or, if the
primary input fails with the given exceptionType, from the result provided by the
fallback. |
<X extends java.lang.Throwable> |
FluentFuture.catchingAsync(java.lang.Class<X> exceptionType,
AsyncFunction<? super X,? extends V> fallback,
java.util.concurrent.Executor executor)
Returns a
Future whose result is taken from this Future or, if the this Future fails with the given exceptionType, from the result provided by the fallback. |
static <V,X extends java.lang.Throwable> |
Futures.catchingAsync(ListenableFuture<? extends V> input,
java.lang.Class<X> exceptionType,
AsyncFunction<? super X,? extends V> fallback)
Deprecated.
Use the overload that requires an executor. For identical behavior, pass
MoreExecutors.directExecutor(), but consider whether another executor would be safer, as
discussed in the ListenableFuture.addListener
documentation. This method is scheduled to be removed in July 2018. |
static <V,X extends java.lang.Throwable> |
Futures.catchingAsync(ListenableFuture<? extends V> input,
java.lang.Class<X> exceptionType,
AsyncFunction<? super X,? extends V> fallback,
java.util.concurrent.Executor executor)
Returns a
Future whose result is taken from the given primary input or, if the
primary input fails with the given exceptionType, from the result provided by the
fallback. |