1 |
torben |
467 |
package dk.thoerup.circuitbreaker.jmx; |
2 |
torben |
402 |
|
3 |
torben |
467 |
import dk.thoerup.circuitbreaker.AccountingCircuitBreaker; |
4 |
torben |
402 |
|
5 |
torben |
403 |
public class JmxAccountingCircuitBreaker extends JmxCircuitBreaker implements JmxAccountingCircuitBreakerMBean { |
6 |
torben |
402 |
|
7 |
|
|
private AccountingCircuitBreaker cb; |
8 |
|
|
|
9 |
|
|
public JmxAccountingCircuitBreaker(AccountingCircuitBreaker cb) { |
10 |
torben |
403 |
super(cb); |
11 |
torben |
402 |
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 |
torben |
403 |
public int getTotalFailureCount() { |
26 |
|
|
return cb.getTotalFailureCount(); |
27 |
torben |
402 |
} |
28 |
|
|
|
29 |
torben |
460 |
public long getLastTrip() { |
30 |
|
|
return cb.getLastTrip(); |
31 |
|
|
} |
32 |
|
|
|
33 |
torben |
404 |
public long getLastResetCounters() { |
34 |
|
|
return cb.getLastResetCounters(); |
35 |
torben |
402 |
} |
36 |
|
|
|
37 |
torben |
621 |
public long getLastFailure() { |
38 |
|
|
return cb.getLastFailure(); |
39 |
|
|
} |
40 |
|
|
|
41 |
torben |
403 |
public int getTotalCallCount() { |
42 |
|
|
return cb.getTotalCallCount(); |
43 |
|
|
} |
44 |
|
|
|
45 |
torben |
402 |
public void resetCounters() { |
46 |
|
|
cb.resetCounters(); |
47 |
|
|
} |
48 |
|
|
|
49 |
|
|
} |