Class Fallback<V>
java.lang.Object
io.smallrye.faulttolerance.core.fallback.Fallback<V>
- All Implemented Interfaces:
FaultToleranceStrategy<V>
- Direct Known Subclasses:
CompletionStageFallback
-
Constructor Summary
ConstructorsConstructorDescriptionFallback(FaultToleranceStrategy<V> delegate, String description, Function<FailureContext, V> fallback, ExceptionDecision exceptionDecision) -
Method Summary
Modifier and TypeMethodDescriptionapply(InvocationContext<V> ctx) Apply the fault tolerance strategy around the targetCallable.
-
Constructor Details
-
Fallback
public Fallback(FaultToleranceStrategy<V> delegate, String description, Function<FailureContext, V> fallback, ExceptionDecision exceptionDecision)
-
-
Method Details
-
apply
Description copied from interface:FaultToleranceStrategyApply the fault tolerance strategy around the targetCallable. TheCallableis wrapped in anInvocationContext.- Specified by:
applyin interfaceFaultToleranceStrategy<V>- Parameters:
ctx- theInvocationContextwrapping theCallableguarded by this fault tolerance strategy- Returns:
- result computed by the target
Callable - Throws:
Exception- if result couldn't be computed
-