Parent Directory | Revision Log | Patch
revision 459 by torben, Wed Oct 21 07:52:08 2009 UTC | revision 463 by torben, Wed Oct 21 09:03:49 2009 UTC | |
---|---|---|
# | Line 19 public class TestCircuitBreaker { | Line 19 public class TestCircuitBreaker { |
19 | public static final int DELAY = 50; | public static final int DELAY = 50; |
20 | public static final int THRESHOLD = 2; | public static final int THRESHOLD = 2; |
21 | ||
class SucceedingInvocation implements CircuitInvocation { | ||
public Object proceed() throws Exception { | ||
return "OK"; | ||
} | ||
} | ||
class FailingInvocation implements CircuitInvocation { | ||
public Object proceed() throws Exception { | ||
throw new IOException("Error"); | ||
} | ||
} | ||
22 | ||
23 | CircuitBreaker cb; | CircuitBreaker cb; |
24 |
|
ViewVC Help | |
Powered by ViewVC 1.1.20 |