Package io.smallrye.faulttolerance.core
Class Invocation<V>
- java.lang.Object
-
- io.smallrye.faulttolerance.core.Invocation<V>
-
- All Implemented Interfaces:
FaultToleranceStrategy<V>
public final class Invocation<V> extends Object implements FaultToleranceStrategy<V>
A "sentinel" fault tolerance strategy that does no processing, it only invokes the guardedCallable. This is supposed to be used as the last fault tolerance stragegy in a chain.There's only one instance of this class, accessible using
invocation().
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vapply(InvocationContext<V> ctx)Apply the fault tolerance strategy around the targetCallable.static <V> Invocation<V>invocation()
-
-
-
Method Detail
-
invocation
public static <V> Invocation<V> invocation()
-
apply
public V apply(InvocationContext<V> ctx) throws Exception
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
-
-