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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

CircuitBreaker/src/dk/thoerup/curcuitbreaker/jmx/JmxAccountingCircuitBreaker.java revision 402 by torben, Tue Oct 6 21:23:49 2009 UTC CircuitBreaker/src/dk/thoerup/circuitbreaker/jmx/JmxAccountingCircuitBreaker.java revision 934 by torben, Mon Jun 28 08:32:45 2010 UTC
# Line 1  Line 1 
1  package dk.thoerup.curcuitbreaker.jmx;  package dk.thoerup.circuitbreaker.jmx;
2    
3  import dk.thoerup.curcuitbreaker.AccountingCircuitBreaker;  import dk.thoerup.circuitbreaker.AccountingCircuitBreaker;
4    
5  public class JmxAccountingCircuitBreaker implements JmxAccountingCircuitBreakerMBean {  public class JmxAccountingCircuitBreaker extends JmxCircuitBreaker implements JmxAccountingCircuitBreakerMBean {
6    
7          private AccountingCircuitBreaker cb;          private AccountingCircuitBreaker cb;
8                    
9          public JmxAccountingCircuitBreaker(AccountingCircuitBreaker cb) {          public JmxAccountingCircuitBreaker(AccountingCircuitBreaker cb) {
10                    super(cb);
11                  this.cb = cb;                  this.cb = cb;
12          }          }
13    
           
           
         //default section  
           
         public String getName() {  
                 return cb.getName();  
         }  
           
         public String getStateName() {  
                 return cb.getStateName();  
         }  
   
         public void reset() {  
                 cb.reset();  
   
         }  
   
         public void tripBreaker() {  
                 cb.tripBreaker();  
         }  
14            
15      //Accounting section      //Accounting section
16            
# Line 37  public class JmxAccountingCircuitBreaker Line 18  public class JmxAccountingCircuitBreaker
18                  return cb.getTripCount();                  return cb.getTripCount();
19          }          }
20                    
21            public int getRetripCount() {
22                    return cb.getRetripCount();
23            }
24            
25          public int getBlockCount() {          public int getBlockCount() {
26                  return cb.getBlockCount();                  return cb.getBlockCount();
27          }          }
28                    
29          public int getFailureCount() {          public int getTotalFailureCount() {
30                  return cb.getFailureCount();                  return cb.getTotalFailureCount();
31            }
32            
33            public long getLastTrip() {
34                    return cb.getLastTrip();
35            }
36            
37            public long getLastRetrip() {
38                    return cb.getLastRetrip();
39          }          }
40                    
41          public long getLastReset() {          public long getLastReset() {
42                  return cb.getLastReset();                  return cb.getLastReset();
43          }          }
44                    
45            public long getLastResetCounters() {
46                    return cb.getLastResetCounters();
47            }
48            
49            public long getLastFailure() {
50                    return cb.getLastFailure();
51            }
52            
53            public int getTotalCallCount() {
54                    return cb.getTotalCallCount();
55            }
56            
57          public void resetCounters() {          public void resetCounters() {
58                  cb.resetCounters();                  cb.resetCounters();
59          }          }

Legend:
Removed from v.402  
changed lines
  Added in v.934

  ViewVC Help
Powered by ViewVC 1.1.20