Added Methods |
ListenableFuture<V> catching(ListenableFuture<?, extends, V>, Class<X>, Function<?, super, X, ?, extends, V>)
|
Returns a {@code Future} whose result is taken from the given primary {@code input} or, if the
primary input fails with the given {@code exceptionType}, from the result provided by the
{@code fallback}. |
ListenableFuture<V> catching(ListenableFuture<?, extends, V>, Class<X>, Function<?, super, X, ?, extends, V>, Executor)
|
Returns a {@code Future} whose result is taken from the given primary {@code input} or, if the
primary input fails with the given {@code exceptionType}, from the result provided by the
{@code fallback}. |
ListenableFuture<V> catchingAsync(ListenableFuture<?, extends, V>, Class<X>, AsyncFunction<?, super, X, ?, extends, V>)
|
Returns a {@code Future} whose result is taken from the given primary {@code input} or, if the
primary input fails with the given {@code exceptionType}, from the result provided by the
{@code fallback}. |
ListenableFuture<V> catchingAsync(ListenableFuture<?, extends, V>, Class<X>, AsyncFunction<?, super, X, ?, extends, V>, Executor)
|
Returns a {@code Future} whose result is taken from the given primary {@code input} or, if the
primary input fails with the given {@code exceptionType}, from the result provided by the
{@code fallback}. |
V getChecked(Future<V>, Class<X>)
|
Returns the result of Future.get(), converting most exceptions to a
new instance of the given checked exception type. |
V getChecked(Future<V>, Class<X>, long, TimeUnit)
|
Returns the result of Future.get(long, TimeUnit), converting most
exceptions to a new instance of the given checked exception type. |
ListenableFuture<O> transformAsync(ListenableFuture<I>, AsyncFunction<?, super, I, ?, extends, O>)
|
Returns a new {@code ListenableFuture} whose result is asynchronously derived from the result
of the given {@code Future}. |
ListenableFuture<O> transformAsync(ListenableFuture<I>, AsyncFunction<?, super, I, ?, extends, O>, Executor)
|
Returns a new {@code ListenableFuture} whose result is asynchronously derived from the result
of the given {@code Future}. |
ListenableFuture<V> withTimeout(ListenableFuture<V>, long, TimeUnit, ScheduledExecutorService)
|
Returns a future that delegates to another but will finish early (via a
TimeoutException wrapped in an ExecutionException) if the
specified duration expires. |
Changed Methods |
V get(Future<V>, Class<X>)
|
Now deprecated.
|
Use {@link #getChecked(Future, Class)}. |
V get(Future<V>, long, TimeUnit, Class<X>)
|
Now deprecated.
|
Use {@link #getChecked(Future, Class, long, TimeUnit)}, noting the change in parameter order. |
ListenableFuture<O> transform(ListenableFuture<I>, AsyncFunction<?, super, I, ?, extends, O>)
|
Now deprecated.
|
These {@code AsyncFunction} overloads of {@code transform} are being renamed to {@code transformAsync}. |
ListenableFuture<O> transform(ListenableFuture<I>, AsyncFunction<?, super, I, ?, extends, O>, Executor)
|
Now deprecated.
|
These {@code AsyncFunction} overloads of {@code transform} are being renamed to {@code transformAsync}. |
ListenableFuture<V> withFallback(ListenableFuture<?, extends, V>, FutureFallback<?, extends, V>)
|
Now deprecated.
|
Use {@link #catchingAsync(ListenableFuture, Class, AsyncFunction) catchingAsync(input, Throwable.class, fallbackImplementedAsAnAsyncFunction)}, usually replacing {@code Throwable.class} with the specific type you want to handle. |
ListenableFuture<V> withFallback(ListenableFuture<?, extends, V>, FutureFallback<?, extends, V>, Executor)
|
Now deprecated.
|
Use {@link #catchingAsync(ListenableFuture, Class, AsyncFunction, Executor) catchingAsync(input, Throwable.class, fallbackImplementedAsAnAsyncFunction, executor)}, usually replacing {@code Throwable.class} with the specific type you want to handle. |