public class Retry<V> extends Object implements FaultToleranceStrategy<V>
| Modifier and Type | Class and Description |
|---|---|
static interface |
Retry.MetricsRecorder |
| Constructor and Description |
|---|
Retry(FaultToleranceStrategy<V> delegate,
String description,
SetOfThrowables retryOn,
SetOfThrowables abortOn,
long maxRetries,
long maxTotalDurationInMillis,
Delay delayBetweenRetries,
Stopwatch stopwatch,
Retry.MetricsRecorder metricsRecorder) |
| Modifier and Type | Method and Description |
|---|---|
V |
apply(InvocationContext<V> ctx)
Apply the fault tolerance strategy around the target
Callable. |
public Retry(FaultToleranceStrategy<V> delegate, String description, SetOfThrowables retryOn, SetOfThrowables abortOn, long maxRetries, long maxTotalDurationInMillis, Delay delayBetweenRetries, Stopwatch stopwatch, Retry.MetricsRecorder metricsRecorder)
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.