Package io.smallrye.faulttolerance.api
Interface CircuitBreakerMaintenance
-
@Experimental("first attempt at providing maintenance access to circuit breakers") public interface CircuitBreakerMaintenanceAllows reading current state of circuit breakers and reseting them to the initial (closed) state. To access a specific circuit breaker, it must be given a name using@CircuitBreakerName.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CircuitBreakerStatecurrentState(String name)Returns current state of the circuit breaker with givenname.voidreset(String name)Resets the circuit breaker with givennameto the initial (closed) state.voidresetAll()Resets all circuit breakers (including those without a name) in the application to the initial (closed) state.
-
-
-
Method Detail
-
currentState
CircuitBreakerState currentState(String name)
Returns current state of the circuit breaker with givenname. Note that there's no guarantee that the circuit breaker will stay in that state for any time, so this method is only useful for monitoring.It is an error to use a
namethat wasn't registered using@CircuitBreakerName.
-
reset
void reset(String name)
Resets the circuit breaker with givennameto the initial (closed) state.This method should not be used regularly, it's mainly meant for testing (to isolate individual tests) and perhaps emergency maintenance tasks.
It is an error to use a
namethat wasn't registered using@CircuitBreakerName.
-
resetAll
void resetAll()
Resets all circuit breakers (including those without a name) in the application to the initial (closed) state.This method should not be used regularly, it's mainly meant for testing (to isolate individual tests) and perhaps emergency maintenance tasks.
-
-