public interface RetryHandler
| Modifier and Type | Field and Description |
|---|---|
static RetryHandler |
DEFAULT |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxRetriesOnNextServer() |
int |
getMaxRetriesOnSameServer() |
boolean |
isCircuitTrippingException(java.lang.Throwable e)
Test if an exception should be treated as circuit failure.
|
boolean |
isRetriableException(java.lang.Throwable e,
boolean sameServer)
Test if an exception is retriable for the load balancer
|
static final RetryHandler DEFAULT
boolean isRetriableException(java.lang.Throwable e,
boolean sameServer)
e - the original exceptionsameServer - if true, the method is trying to determine if retry can be
done on the same server. Otherwise, it is testing whether retry can be
done on a different serverboolean isCircuitTrippingException(java.lang.Throwable e)
ConnectException is a circuit failure. This is used to determine
whether successive exceptions of such should trip the circuit breaker to a particular
host by the load balancer. If false but a server response is absent,
load balancer will also close the circuit upon getting such exception.int getMaxRetriesOnSameServer()
int getMaxRetriesOnNextServer()