Module io.helidon.faulttolerance
Package io.helidon.faulttolerance
Annotation Interface Ft.CircuitBreaker
- Enclosing class:
Ft
The annotated method (or all methods on annotated type) will have circuit breaker according to the configuration.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThese throwables will be considered failures.Delay duration.int
How many failures out of 100 will trigger the circuit to open.If named, an attempt will be made to find a namedCircuitBreaker
instance in service registry.These throwables will not be considered failures, all other will.int
How many successful calls will close a half-open circuit.int
Rolling window size used to calculate ratio of failed requests.
-
Element Details
-
name
String nameIf named, an attempt will be made to find a namedCircuitBreaker
instance in service registry. If not found, a new circuit breaker will be created based on values on this annotation.- Returns:
- name of this retry
- Default:
""
-
delay
String delayDelay duration. Defaults toPT5S
(5 seconds).- Returns:
- duration to wait before transitioning from open to half-open state
- Default:
"PT5S"
-
errorRatio
int errorRatioHow many failures out of 100 will trigger the circuit to open. This is adapted to thevolume()
used to handle the window of requests.If errorRatio is 40, and volume is 10, 4 failed requests will open the circuit. Default is 60.
- Returns:
- percent of failure that trigger the circuit to open
- See Also:
- Default:
60
-
volume
int volumeRolling window size used to calculate ratio of failed requests. Default is 10.- Returns:
- how big a window is used to calculate error errorRatio
- See Also:
- Default:
10
-
successThreshold
int successThresholdHow many successful calls will close a half-open circuit. Nevertheless, the first failed call will open the circuit again. Default is 1.- Returns:
- number of calls
- Default:
1
-
skipOn
These throwables will not be considered failures, all other will.- Returns:
- throwable classes to not be considered a failure
- See Also:
- Default:
{}
-
applyOn
These throwables will be considered failures.- Returns:
- throwable classes to be considered a failure
- See Also:
- Default:
{}
-