Package org.pjdbc.jmx
Interface CircuitBreakerMBean
- All Known Implementing Classes:
CircuitBreakerMBeanImpl
public interface CircuitBreakerMBean
JMX MBean interface for monitoring CircuitBreaker state.
Exposes circuit breaker state, configuration, and statistics for operational monitoring via JMX.
-
Method Summary
Modifier and TypeMethodDescriptionvoidForce circuit to CLOSED state.voidForce circuit to OPEN state.intGet current consecutive failure count.doubleGet failure rate as percentage (0-100).intGet failure threshold before opening circuit.getName()Get the circuit breaker name.longGet reset timeout in milliseconds (OPEN to HALF_OPEN).getState()Get current circuit breaker state: CLOSED, OPEN, or HALF_OPEN.intGet current consecutive success count (in HALF_OPEN state).intGet success threshold to close circuit from half-open.longGet total failed requests.longGet total rejected requests (circuit was open).longGet total requests processed.voidreset()Reset the circuit breaker to CLOSED state and clear all counters.
-
Method Details
-
getState
String getState()Get current circuit breaker state: CLOSED, OPEN, or HALF_OPEN. -
getName
String getName()Get the circuit breaker name. -
getFailureThreshold
int getFailureThreshold()Get failure threshold before opening circuit. -
getSuccessThreshold
int getSuccessThreshold()Get success threshold to close circuit from half-open. -
getResetTimeout
long getResetTimeout()Get reset timeout in milliseconds (OPEN to HALF_OPEN). -
getFailureCount
int getFailureCount()Get current consecutive failure count. -
getSuccessCount
int getSuccessCount()Get current consecutive success count (in HALF_OPEN state). -
getTotalRequests
long getTotalRequests()Get total requests processed. -
getTotalFailures
long getTotalFailures()Get total failed requests. -
getTotalRejections
long getTotalRejections()Get total rejected requests (circuit was open). -
getFailureRatePercent
double getFailureRatePercent()Get failure rate as percentage (0-100). -
reset
void reset()Reset the circuit breaker to CLOSED state and clear all counters. -
forceOpen
void forceOpen()Force circuit to OPEN state. -
forceClosed
void forceClosed()Force circuit to CLOSED state.
-