Class FallbackImpl<R>
java.lang.Object
dev.failsafe.internal.FallbackImpl<R>
- Type Parameters:
R- result type
- All Implemented Interfaces:
Fallback<R>, Policy<R>, FailurePolicy<R>
A
Fallback implementation.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Rapply(R result, Throwable exception, ExecutionContext<R> context) Returns the applied fallback result.protected CompletableFuture<R> applyStage(R result, Throwable exception, ExecutionContext<R> context) Returns a future applied fallback result.Returns theFallbackConfigthat the Fallback was built with.toExecutor(int policyIndex) Returns aPolicyExecutorcapable of handling an execution for the Policy.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FailurePolicy
isFailure
-
Field Details
-
NONE
-
config
-
-
Constructor Details
-
FallbackImpl
-
-
Method Details
-
getConfig
Description copied from interface:FallbackReturns theFallbackConfigthat the Fallback was built with. -
apply
-
applyStage
protected CompletableFuture<R> applyStage(R result, Throwable exception, ExecutionContext<R> context) throws Throwable Returns a future applied fallback result.- Throws:
Throwable
-
toExecutor
Description copied from interface:PolicyReturns aPolicyExecutorcapable of handling an execution for the Policy.- Specified by:
toExecutorin interfacePolicy<R>
-