public final class Invocation<V> extends Object implements FaultToleranceStrategy<V>
Callable.
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().
| Modifier and Type | Method and Description |
|---|---|
V |
apply(InvocationContext<V> ctx)
Apply the fault tolerance strategy around the target
Callable. |
static <V> Invocation<V> |
invocation() |
public static <V> Invocation<V> invocation()
public V apply(InvocationContext<V> ctx) throws Exception
FaultToleranceStrategyCallable.
The Callable is wrapped in an InvocationContext.apply in interface FaultToleranceStrategy<V>ctx - the InvocationContext wrapping the Callable guarded by this fault tolerance strategyCallableException - if result couldn't be computedCopyright © 2018–2020. All rights reserved.