Package com.tnsai.annotations
Annotation Interface Resilience.CircuitBreaker
- Enclosing class:
Resilience
Circuit breaker configuration.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether circuit breaker is enabled.intFailure rate percentage to trip circuit (0-100).intNumber of failures before opening circuit.intTime window for counting failures in milliseconds.intTime to wait before attempting reset in milliseconds.intNumber of successful calls needed in half-open state.
-
Element Details
-
enabled
boolean enabledWhether circuit breaker is enabled.- Default:
false
-
failureThreshold
int failureThresholdNumber of failures before opening circuit.- Default:
5
-
failureWindowMs
int failureWindowMsTime window for counting failures in milliseconds.- Default:
60000
-
resetTimeoutMs
int resetTimeoutMsTime to wait before attempting reset in milliseconds.- Default:
30000
-
successThreshold
int successThresholdNumber of successful calls needed in half-open state.- Default:
3
-
failureRateThreshold
int failureRateThresholdFailure rate percentage to trip circuit (0-100).Alternative to failureThreshold count.
- Default:
0
-