R - result typepublic class FallbackConfig<R> extends FailurePolicyConfig<R>
Fallback.
This class is threadsafe.
FallbackBuilder| Modifier and Type | Method and Description |
|---|---|
EventListener<ExecutionAttemptedEvent<R>> |
getFailedAttemptListener()
Returns the failed attempt event listener.
|
CheckedFunction<ExecutionAttemptedEvent<R>,R> |
getFallback()
Returns the fallback function, else
null if a fallback stage function was configured instead. |
CheckedFunction<ExecutionAttemptedEvent<R>,CompletableFuture<R>> |
getFallbackStage()
Returns the fallback stage function, else
null if a fallback function was configured instead. |
boolean |
isAsync()
Returns whether the Fallback is configured to handle execution results asynchronously, separate from execution.
|
getFailureConditions, isExceptionsCheckedgetFailureListener, getSuccessListenerpublic CheckedFunction<ExecutionAttemptedEvent<R>,R> getFallback()
null if a fallback stage function was configured instead.Fallback.of(CheckedRunnable),
Fallback.of(CheckedSupplier),
Fallback.of(CheckedConsumer),
Fallback.of(CheckedFunction),
Fallback.of(Object),
Fallback.ofException(CheckedFunction),
Fallback.builder(CheckedRunnable),
Fallback.builder(CheckedSupplier),
Fallback.builder(CheckedConsumer),
Fallback.builder(CheckedFunction),
Fallback.builder(Object),
Fallback.builderOfException(CheckedFunction)public CheckedFunction<ExecutionAttemptedEvent<R>,CompletableFuture<R>> getFallbackStage()
null if a fallback function was configured instead.public boolean isAsync()
FallbackBuilder.withAsync()public EventListener<ExecutionAttemptedEvent<R>> getFailedAttemptListener()
Copyright © 2022. All rights reserved.