/[projects]/CircuitBreaker/src/dk/thoerup/circuitbreaker/jmx/JmxAccountingCircuitBreaker.java
ViewVC logotype

Contents of /CircuitBreaker/src/dk/thoerup/circuitbreaker/jmx/JmxAccountingCircuitBreaker.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 624 - (show annotations) (download)
Mon Mar 8 09:46:10 2010 UTC (14 years, 2 months ago) by torben
File size: 995 byte(s)
Also keep track on when things went back to normal
1 package dk.thoerup.circuitbreaker.jmx;
2
3 import dk.thoerup.circuitbreaker.AccountingCircuitBreaker;
4
5 public class JmxAccountingCircuitBreaker extends JmxCircuitBreaker implements JmxAccountingCircuitBreakerMBean {
6
7 private AccountingCircuitBreaker cb;
8
9 public JmxAccountingCircuitBreaker(AccountingCircuitBreaker cb) {
10 super(cb);
11 this.cb = cb;
12 }
13
14
15 //Accounting section
16
17 public int getTripCount() {
18 return cb.getTripCount();
19 }
20
21 public int getBlockCount() {
22 return cb.getBlockCount();
23 }
24
25 public int getTotalFailureCount() {
26 return cb.getTotalFailureCount();
27 }
28
29 public long getLastTrip() {
30 return cb.getLastTrip();
31 }
32
33 public long getLastReset() {
34 return cb.getLastReset();
35 }
36
37 public long getLastResetCounters() {
38 return cb.getLastResetCounters();
39 }
40
41 public long getLastFailure() {
42 return cb.getLastFailure();
43 }
44
45 public int getTotalCallCount() {
46 return cb.getTotalCallCount();
47 }
48
49 public void resetCounters() {
50 cb.resetCounters();
51 }
52
53 }

  ViewVC Help
Powered by ViewVC 1.1.20