Class AbstractCatchingFuture.CatchingFuture<V,X extends java.lang.Throwable>
- java.lang.Object
-
- com.google.common.util.concurrent.AbstractFuture<V>
-
- com.google.common.util.concurrent.AbstractFuture.TrustedFuture<V>
-
- com.google.common.util.concurrent.AbstractCatchingFuture<V,X,Function<? super X,? extends V>,V>
-
- com.google.common.util.concurrent.AbstractCatchingFuture.CatchingFuture<V,X>
-
- All Implemented Interfaces:
ListenableFuture<V>
,java.lang.Runnable
,java.util.concurrent.Future<V>
- Enclosing class:
- AbstractCatchingFuture<V,X extends java.lang.Throwable,F,T>
private static final class AbstractCatchingFuture.CatchingFuture<V,X extends java.lang.Throwable> extends AbstractCatchingFuture<V,X,Function<? super X,? extends V>,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.util.concurrent.AbstractFuture
AbstractFuture.TrustedFuture<V>
-
-
Field Summary
-
Fields inherited from class com.google.common.util.concurrent.AbstractCatchingFuture
exceptionType, fallback, inputFuture
-
-
Constructor Summary
Constructors Constructor Description CatchingFuture(ListenableFuture<? extends V> input, java.lang.Class<X> exceptionType, Function<? super X,? extends V> fallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) V
doFallback(Function<? super X,? extends V> fallback, X cause)
Template method for subtypes to actually run the fallback.(package private) void
setResult(V result)
Template method for subtypes to actually set the result.-
Methods inherited from class com.google.common.util.concurrent.AbstractCatchingFuture
afterDone, create, create, create, create, run
-
Methods inherited from class com.google.common.util.concurrent.AbstractFuture.TrustedFuture
addListener, cancel, get, get, isCancelled, isDone
-
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
interruptTask, maybePropagateCancellation, set, setException, setFuture, trustedGetException, wasInterrupted
-
-
-
-
Method Detail
-
doFallback
@Nullable V doFallback(Function<? super X,? extends V> fallback, X cause) throws java.lang.Exception
Description copied from class:AbstractCatchingFuture
Template method for subtypes to actually run the fallback.- Specified by:
doFallback
in classAbstractCatchingFuture<V,X extends java.lang.Throwable,Function<? super X extends java.lang.Throwable,? extends V>,V>
- Throws:
java.lang.Exception
-
setResult
void setResult(@Nullable V result)
Description copied from class:AbstractCatchingFuture
Template method for subtypes to actually set the result.
-
-