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>
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
Fields inherited from class com.google.common.util.concurrent.AbstractCatchingFuture
exceptionType, fallback, inputFuture
Fields inherited from class com.google.common.util.concurrent.AbstractFuture
GENERATE_CANCELLATION_CAUSES, log
-
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) void
setResult
(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, createAsync, pendingToString, run
Methods inherited from class com.google.common.util.concurrent.FluentFuture.TrustedFuture
addListener, cancel, get, get, isCancelled, isDone
Methods inherited from class com.google.common.util.concurrent.FluentFuture
addCallback, catching, catchingAsync, from, from, transform, transformAsync, withTimeout, withTimeout
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
interruptTask, maybePropagateCancellationTo, set, setException, setFuture, toString, tryInternalFastPathGetFailure, wasInterrupted
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
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:AbstractCatchingFuture
Template method for subtypes to actually run the fallback.- Specified by:
doFallback
in classAbstractCatchingFuture<V,
X extends Throwable, AsyncFunction<? super X extends Throwable, ? extends V>, ListenableFuture<? extends V>> - Throws:
Exception
-
setResult
Description copied from class:AbstractCatchingFuture
Template method for subtypes to actually set the result.- Specified by:
setResult
in classAbstractCatchingFuture<V,
X extends Throwable, AsyncFunction<? super X extends Throwable, ? extends V>, ListenableFuture<? extends V>>
-