public class ZestCircuitBreaker extends <any> implements CircuitBreaker
| Constructor and Description |
|---|
ZestCircuitBreaker(int threshold,
long timeout) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowRequest()
Is request is allowed to go through (is circuit breaker closed or opened).
|
void |
markFailure(Throwable cause)
Reports about failure conditions to circuit breaker.
|
void |
markSuccess()
Reports about successful invocation to circuit breaker.
|
public boolean allowRequest()
CircuitBreakerallowRequest in interface CircuitBreakerpublic void markFailure(Throwable cause)
CircuitBreakermarkFailure in interface CircuitBreakercause - exception happened (could be null in case the error is deducted
from response status/code).public void markSuccess()
CircuitBreakermarkSuccess in interface CircuitBreakerApache CXF