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

Annotation of /miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/HalfOpenState.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2449 - (hide annotations) (download)
Fri Mar 20 08:58:46 2015 UTC (9 years, 2 months ago) by torben
File size: 606 byte(s)
switch to maven
1 torben 467 package dk.thoerup.circuitbreaker;
2 torben 393
3    
4    
5 torben 424 public final class HalfOpenState implements CircuitBreakerState {
6 torben 393
7 torben 450 public void preInvoke(CircuitBreaker circuitBreaker) throws Exception
8 torben 393 {
9     // NO OP
10     }
11    
12 torben 450 public void postInvoke(CircuitBreaker circuitBreaker) throws Exception
13 torben 393 {
14     circuitBreaker.reset();
15     }
16    
17 torben 450 public void onError(CircuitBreaker circuitBreaker, Exception e) throws Exception
18 torben 393 {
19 torben 864 circuitBreaker.retripBreaker();
20 torben 459 throw new CircuitBreakerException("Circuitbreaker, failed in half-open", e);
21 torben 393 }
22 torben 397
23     public String getName() {
24     return "Half-open";
25     }
26 torben 393 }

Properties

Name Value
svn:mergeinfo

  ViewVC Help
Powered by ViewVC 1.1.20