public class CompletionStageCircuitBreaker<V> extends CircuitBreaker<CompletionStage<V>>
CircuitBreaker.MetricsRecorder| Constructor and Description |
|---|
CompletionStageCircuitBreaker(FaultToleranceStrategy<CompletionStage<V>> delegate,
String description,
SetOfThrowables failOn,
SetOfThrowables skipOn,
long delayInMillis,
int requestVolumeThreshold,
double failureRatio,
int successThreshold,
Stopwatch stopwatch,
CircuitBreaker.MetricsRecorder metricsRecorder) |
| Modifier and Type | Method and Description |
|---|---|
CompletionStage<V> |
apply(InvocationContext<CompletionStage<V>> ctx)
Apply the fault tolerance strategy around the target
Callable. |
addListenerpublic CompletionStageCircuitBreaker(FaultToleranceStrategy<CompletionStage<V>> delegate, String description, SetOfThrowables failOn, SetOfThrowables skipOn, long delayInMillis, int requestVolumeThreshold, double failureRatio, int successThreshold, Stopwatch stopwatch, CircuitBreaker.MetricsRecorder metricsRecorder)
public CompletionStage<V> apply(InvocationContext<CompletionStage<V>> ctx) throws Exception
FaultToleranceStrategyCallable.
The Callable is wrapped in an InvocationContext.apply in interface FaultToleranceStrategy<CompletionStage<V>>apply in class CircuitBreaker<CompletionStage<V>>ctx - the InvocationContext wrapping the Callable guarded by this fault tolerance strategyCallableException - if result couldn't be computedCopyright © 2018–2020. All rights reserved.