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

Contents of /CircuitBreaker/src/dk/thoerup/circuitbreaker/HalfOpenState.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 467 - (show annotations) (download)
Thu Oct 22 06:01:35 2009 UTC (14 years, 7 months ago) by torben
File size: 604 byte(s)
Rename package
1 package dk.thoerup.circuitbreaker;
2
3
4
5 public final class HalfOpenState implements CircuitBreakerState {
6
7 public void preInvoke(CircuitBreaker circuitBreaker) throws Exception
8 {
9 // NO OP
10 }
11
12 public void postInvoke(CircuitBreaker circuitBreaker) throws Exception
13 {
14 circuitBreaker.reset();
15 }
16
17 public void onError(CircuitBreaker circuitBreaker, Exception e) throws Exception
18 {
19 circuitBreaker.tripBreaker();
20 throw new CircuitBreakerException("Circuitbreaker, failed in half-open", e);
21 }
22
23 public String getName() {
24 return "Half-open";
25 }
26 }

Properties

Name Value
svn:mergeinfo

  ViewVC Help
Powered by ViewVC 1.1.20