Futures.catching*.
| Modifier and Type | Class and Description |
|---|---|
| private static class | AbstractCatchingFuture.
An |
| private static class | AbstractCatchingFuture.
An |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Class | |
| pack-priv F | |
| pack-priv ListenableFuture |
| Access | Constructor and Description |
|---|---|
| pack-priv | AbstractCatchingFuture(ListenableFuture<? extends V> inputFuture, Class<X> exceptionType, F fallback)
|
| Modifier and Type | Method and Description |
|---|---|
| protected final void | afterDone()
Overrides com. |
| pack-priv static <V extends @Nullable Object, X extends Throwable> ListenableFuture | create(ListenableFuture<? extends V> input, Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor)
|
| pack-priv static <X extends Throwable, V extends @Nullable Object> ListenableFuture | create(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor)
|
| pack-priv abstract T | |
| protected String | pendingToString()
Overrides com. |
| public final void | |
| pack-priv abstract void |
| exceptionType | back to summary |
|---|---|
| pack-priv Class<X> exceptionType
| |
| fallback | back to summary |
|---|---|
| pack-priv F fallback
| |
| inputFuture | back to summary |
|---|---|
| pack-priv ListenableFuture<? extends V> inputFuture
| |
| AbstractCatchingFuture | back to summary |
|---|---|
| pack-priv AbstractCatchingFuture(ListenableFuture<? extends V> inputFuture, Class<X> exceptionType, F fallback) | |
| afterDone | back to summary |
|---|---|
| protected final void afterDone() Overrides com. Doc from com. Callback method that is called exactly once after the future is completed. If The default implementation of this method in
| |
| create | back to summary |
|---|---|
| pack-priv static <V extends @Nullable Object, X extends Throwable> ListenableFuture | |
| create | back to summary |
|---|---|
| pack-priv static <X extends Throwable, V extends @Nullable Object> ListenableFuture | |
| doFallback | back to summary |
|---|---|
| pack-priv abstract T doFallback(F fallback, X throwable) throws Exception Template method for subtypes to actually run the fallback.
| |
| pendingToString | back to summary |
|---|---|
| protected String pendingToString() Overrides com. Doc from com. Provide a human-readable explanation of why this future has not yet completed.
| |
| run | back to summary |
|---|---|
| public final void run() Implements java. Doc from java. Runs this operation.
| |
| setResult | back to summary |
|---|---|
| pack-priv abstract void setResult(T result) Template method for subtypes to actually set the result.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv | AsyncCatchingFuture(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv ListenableFuture | doFallback(AsyncFunction<? super X, ? extends V> fallback, X cause)
Implements abstract com. |
| pack-priv void | setResult(ListenableFuture<? extends V> result)
Implements abstract com. |
| AsyncCatchingFuture | back to summary |
|---|---|
| pack-priv AsyncCatchingFuture(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback) | |
| doFallback | back to summary |
|---|---|
| pack-priv ListenableFuture Implements abstract com. Doc from com. Template method for subtypes to actually run the fallback.
| |
| setResult | back to summary |
|---|---|
| pack-priv void setResult(ListenableFuture<? extends V> result) Implements abstract com. Doc from com. Template method for subtypes to actually set the result.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv | CatchingFuture(ListenableFuture<? extends V> input, Class<X> exceptionType, Function<? super X, ? extends V> fallback)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv V | doFallback(Function<? super X, ? extends V> fallback, X cause)
Implements abstract com. |
| pack-priv void | setResult(V result)
Implements abstract com. |
| CatchingFuture | back to summary |
|---|---|
| pack-priv CatchingFuture(ListenableFuture<? extends V> input, Class<X> exceptionType, Function<? super X, ? extends V> fallback) | |
| doFallback | back to summary |
|---|---|
| pack-priv V doFallback(Function<? super X, ? extends V> fallback, X cause) throws Exception Implements abstract com. Doc from com. Template method for subtypes to actually run the fallback.
| |
| setResult | back to summary |
|---|---|
| pack-priv void setResult(V result) Implements abstract com. Doc from com. Template method for subtypes to actually set the result.
| |