Class AbstractCatchingFuture.AsyncCatchingFuture<V,X extends Throwable>
java.lang.Object
com.google.common.util.concurrent.internal.InternalFutureFailureAccess
com.google.common.util.concurrent.AbstractFuture<V>
com.google.common.util.concurrent.GwtFluentFutureCatchingSpecialization<V>
com.google.common.util.concurrent.FluentFuture<V>
com.google.common.util.concurrent.FluentFuture.TrustedFuture<V>
com.google.common.util.concurrent.AbstractCatchingFuture<V,X,AsyncFunction<? super X,? extends V>,ListenableFuture<? extends V>>
com.google.common.util.concurrent.AbstractCatchingFuture.AsyncCatchingFuture<V,X>
- All Implemented Interfaces:
AbstractFuture.Trusted<V>,ListenableFuture<V>,Runnable,Future<V>
private static final class AbstractCatchingFuture.AsyncCatchingFuture<V,X extends Throwable>
extends AbstractCatchingFuture<V,X,AsyncFunction<? super X,? extends V>,ListenableFuture<? extends V>>
An
AbstractCatchingFuture that delegates to an AsyncFunction and AbstractFuture.setFuture(ListenableFuture).-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.util.concurrent.FluentFuture
FluentFuture.TrustedFuture<V>Nested classes/interfaces inherited from class com.google.common.util.concurrent.AbstractFuture
AbstractFuture.Trusted<V> -
Field Summary
Fields inherited from class com.google.common.util.concurrent.AbstractCatchingFuture
exceptionType, fallback, inputFutureFields inherited from class com.google.common.util.concurrent.AbstractFuture
GENERATE_CANCELLATION_CAUSES -
Constructor Summary
ConstructorsConstructorDescriptionAsyncCatchingFuture(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback) -
Method Summary
Modifier and TypeMethodDescription(package private) ListenableFuture<? extends V>doFallback(AsyncFunction<? super X, ? extends V> fallback, X cause) Template method for subtypes to actually run the fallback.(package private) voidsetResult(ListenableFuture<? extends V> result) Template method for subtypes to actually set the result.Methods inherited from class com.google.common.util.concurrent.AbstractCatchingFuture
afterDone, create, create, pendingToString, runMethods inherited from class com.google.common.util.concurrent.FluentFuture.TrustedFuture
addListener, cancel, get, get, isCancelled, isDoneMethods inherited from class com.google.common.util.concurrent.FluentFuture
addCallback, catching, catchingAsync, from, from, transform, transformAsync, withTimeout, withTimeoutMethods inherited from class com.google.common.util.concurrent.AbstractFuture
interruptTask, maybePropagateCancellationTo, set, setException, setFuture, toString, tryInternalFastPathGetFailure, wasInterrupted
-
Constructor Details
-
AsyncCatchingFuture
AsyncCatchingFuture(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback)
-
-
Method Details
-
doFallback
ListenableFuture<? extends V> doFallback(AsyncFunction<? super X, ? extends V> fallback, X cause) throws ExceptionDescription copied from class:AbstractCatchingFutureTemplate method for subtypes to actually run the fallback.- Specified by:
doFallbackin classAbstractCatchingFuture<V,X extends Throwable, AsyncFunction<? super X extends Throwable, ? extends V>, ListenableFuture<? extends V>> - Throws:
Exception
-
setResult
Description copied from class:AbstractCatchingFutureTemplate method for subtypes to actually set the result.- Specified by:
setResultin classAbstractCatchingFuture<V,X extends Throwable, AsyncFunction<? super X extends Throwable, ? extends V>, ListenableFuture<? extends V>>
-