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

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

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

revision 863 by torben, Mon Mar 8 10:12:59 2010 UTC revision 864 by torben, Sun Jun 20 21:54:53 2010 UTC
# Line 92  public class CircuitBreaker{ Line 92  public class CircuitBreaker{
92          }              }    
93      }      }
94            
95            //a re-trip should basically do the same as a normal trip, but it is here just to differentiate the two different events
96        public void retripBreaker() {
97            synchronized(this) {
98                    if (currentState != open) { // TODO:Is this conditional necessary ??
99                            open.trip();
100                            currentState = open;
101                    
102                            notifier.sendNotification(name, Notifier.Event.BreakerRetripped);
103                    }
104            }    
105        }
106    
107      public void attemptReset() {      public void attemptReset() {
108          synchronized(this) {          synchronized(this) {
109                  if (currentState != halfOpen) { // TODO:Is this conditional necessary ??                  if (currentState != halfOpen) { // TODO:Is this conditional necessary ??

Legend:
Removed from v.863  
changed lines
  Added in v.864

  ViewVC Help
Powered by ViewVC 1.1.20