public class CompletionStageRetry<V> extends Retry<CompletionStage<V>>
Retry.MetricsRecorder| Constructor and Description |
|---|
CompletionStageRetry(FaultToleranceStrategy<CompletionStage<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 |
|---|---|
CompletionStage<V> |
apply(InvocationContext<CompletionStage<V>> ctx)
Apply the fault tolerance strategy around the target
Callable. |
CompletionStage<V> |
doRetry(InvocationContext<CompletionStage<V>> target,
int attempt,
RunningStopwatch stopwatch,
Throwable latestFailure) |
public CompletionStageRetry(FaultToleranceStrategy<CompletionStage<V>> delegate, String description, SetOfThrowables retryOn, SetOfThrowables abortOn, long maxRetries, long maxTotalDurationInMillis, Delay delayBetweenRetries, Stopwatch stopwatch, Retry.MetricsRecorder metricsRecorder)
public CompletionStage<V> apply(InvocationContext<CompletionStage<V>> ctx)
FaultToleranceStrategyCallable.
The Callable is wrapped in an InvocationContext.apply in interface FaultToleranceStrategy<CompletionStage<V>>apply in class Retry<CompletionStage<V>>ctx - the InvocationContext wrapping the Callable guarded by this fault tolerance strategyCallablepublic CompletionStage<V> doRetry(InvocationContext<CompletionStage<V>> target, int attempt, RunningStopwatch stopwatch, Throwable latestFailure)
Copyright © 2018–2020. All rights reserved.