Class CompletionStageCircuitBreaker<V>
java.lang.Object
io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker<CompletionStage<V>>
io.smallrye.faulttolerance.core.circuit.breaker.CompletionStageCircuitBreaker<V>
- All Implemented Interfaces:
FaultToleranceStrategy<CompletionStage<V>>
-
Field Summary
Fields inherited from class io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker
STATE_CLOSED, STATE_HALF_OPEN, STATE_OPEN -
Constructor Summary
ConstructorsConstructorDescriptionCompletionStageCircuitBreaker(FaultToleranceStrategy<CompletionStage<V>> delegate, String description, ExceptionDecision exceptionDecision, long delayInMillis, int requestVolumeThreshold, double failureRatio, int successThreshold, Stopwatch stopwatch, Timer timer) -
Method Summary
Modifier and TypeMethodDescriptionapply(InvocationContext<CompletionStage<V>> ctx) Apply the fault tolerance strategy around the targetCallable.Methods inherited from class io.smallrye.faulttolerance.core.circuit.breaker.CircuitBreaker
currentState, reset
-
Constructor Details
-
CompletionStageCircuitBreaker
public CompletionStageCircuitBreaker(FaultToleranceStrategy<CompletionStage<V>> delegate, String description, ExceptionDecision exceptionDecision, long delayInMillis, int requestVolumeThreshold, double failureRatio, int successThreshold, Stopwatch stopwatch, Timer timer)
-
-
Method Details
-
apply
Description copied from interface:FaultToleranceStrategyApply the fault tolerance strategy around the targetCallable. TheCallableis wrapped in anInvocationContext.- Specified by:
applyin interfaceFaultToleranceStrategy<V>- Overrides:
applyin classCircuitBreaker<CompletionStage<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
-