/[projects]/miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/jmx/JmxCircuitBreaker.java
ViewVC logotype

Contents of /miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/jmx/JmxCircuitBreaker.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2570 - (show annotations) (download)
Tue Jun 9 09:05:26 2015 UTC (8 years, 11 months ago) by torben
File size: 961 byte(s)
Remove old/deprecated inherited circuitbreakers
1 package dk.thoerup.circuitbreaker.jmx;
2
3 import dk.thoerup.circuitbreaker.CircuitBreaker;
4
5 public class JmxCircuitBreaker implements JmxCircuitBreakerMBean {
6
7 private CircuitBreaker cb;
8
9 public JmxCircuitBreaker(CircuitBreaker cb) {
10 this.cb = cb;
11 }
12
13 public String getName() {
14 return cb.getName();
15 }
16
17 public String getStateName() {
18 return cb.getStateName();
19 }
20
21 public int getThreshold() {
22 return cb.getThreshold();
23 }
24
25 public int getTimeout() {
26 return cb.getTimeout();
27 }
28
29 public int getFailureCount() {
30 return cb.getFailureCount();
31 }
32
33 public long getElapsed() {
34 return cb.getElapsed();
35 }
36
37 public String getNotifierName() {
38 return cb.getNotifierName();
39 }
40
41 public String getStatisticsName() {
42 return cb.getStatistics().getClass().getSimpleName();
43 }
44
45
46 public void reset() {
47 cb.reset();
48
49 }
50
51 public void tripBreaker() {
52 cb.tripBreaker();
53 }
54
55 }

  ViewVC Help
Powered by ViewVC 1.1.20