--- CircuitBreaker/src/dk/thoerup/curcuitbreaker/jmx/JmxAccountingCircuitBreaker.java 2009/10/06 21:23:49 402 +++ CircuitBreaker/src/dk/thoerup/circuitbreaker/jmx/JmxAccountingCircuitBreaker.java 2010/06/28 08:32:45 934 @@ -1,35 +1,16 @@ -package dk.thoerup.curcuitbreaker.jmx; +package dk.thoerup.circuitbreaker.jmx; -import dk.thoerup.curcuitbreaker.AccountingCircuitBreaker; +import dk.thoerup.circuitbreaker.AccountingCircuitBreaker; -public class JmxAccountingCircuitBreaker implements JmxAccountingCircuitBreakerMBean { +public class JmxAccountingCircuitBreaker extends JmxCircuitBreaker implements JmxAccountingCircuitBreakerMBean { private AccountingCircuitBreaker cb; public JmxAccountingCircuitBreaker(AccountingCircuitBreaker cb) { + super(cb); this.cb = cb; } - - - //default section - - public String getName() { - return cb.getName(); - } - - public String getStateName() { - return cb.getStateName(); - } - - public void reset() { - cb.reset(); - - } - - public void tripBreaker() { - cb.tripBreaker(); - } //Accounting section @@ -37,18 +18,42 @@ return cb.getTripCount(); } + public int getRetripCount() { + return cb.getRetripCount(); + } + public int getBlockCount() { return cb.getBlockCount(); } - public int getFailureCount() { - return cb.getFailureCount(); + public int getTotalFailureCount() { + return cb.getTotalFailureCount(); + } + + public long getLastTrip() { + return cb.getLastTrip(); + } + + public long getLastRetrip() { + return cb.getLastRetrip(); } public long getLastReset() { return cb.getLastReset(); } + public long getLastResetCounters() { + return cb.getLastResetCounters(); + } + + public long getLastFailure() { + return cb.getLastFailure(); + } + + public int getTotalCallCount() { + return cb.getTotalCallCount(); + } + public void resetCounters() { cb.resetCounters(); }