Annotation Type CircuitBreaker
-
@Inherited @Retention(RUNTIME) @Documented @InterceptorBinding @Target({METHOD,TYPE}) public @interface CircuitBreaker
Define the Circuit Breaker policy
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description long
delay
The delay.java.time.temporal.ChronoUnit
delayUnit
java.lang.Class<? extends java.lang.Throwable>[]
failOn
Define the failure criteriadouble
failureRatio
The failure threshold to trigger the circuit to open.int
requestVolumeThreshold
The number of consecutive requests in a rolling window that will trip the circuit.int
successThreshold
For an open circuit, after the delay period is reached, once the successThreshold is reached, the circuit is back to close again.
-
-
-
-
failureRatio
double failureRatio
The failure threshold to trigger the circuit to open. e.g. if the requestVolumeThreshold is 20 and failureRation is .50, more than 10 failures in 20 consecutive requests will trigger the circuit to open. The value must be between 0 and 1 inclusive.- Returns:
- The failure threshold to open the circuit
- Default:
- 0.5
-
-