public class ZestCircuitBreaker extends org.qi4j.library.circuitbreaker.CircuitBreaker 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()
CircuitBreaker
allowRequest
in interface CircuitBreaker
public void markFailure(Throwable cause)
CircuitBreaker
markFailure
in interface CircuitBreaker
cause
- exception happened (could be null in case the error is deducted
from response status/code).public void markSuccess()
CircuitBreaker
markSuccess
in interface CircuitBreaker
Apache CXF