public static final class DefaultAutoRetryStrategyProvider.Builder
extends java.lang.Object
DefaultAutoRetryStrategyProvider
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
AutoRetryStrategyProvider |
build()
Builds a new
AutoRetryStrategyProvider . |
DefaultAutoRetryStrategyProvider.Builder |
disableRetryAllRetryableExceptions()
Connection closures (by the peer or locally) and new requests may happen concurrently.
|
DefaultAutoRetryStrategyProvider.Builder |
disableWaitForLoadBalancer()
By default, automatic retries waits for the associated
LoadBalancer to be ready before triggering a
retry for requests. |
DefaultAutoRetryStrategyProvider.Builder |
maxRetries(int maxRetries)
Updates maximum number of automatic retries done for any request.
|
public DefaultAutoRetryStrategyProvider.Builder disableWaitForLoadBalancer()
LoadBalancer
to be ready before triggering a
retry for requests. This behavior may add latency to requests till the time the load balancer is ready
instead of failing fast. This method disables the default behavior.this
.public DefaultAutoRetryStrategyProvider.Builder disableRetryAllRetryableExceptions()
LoadBalancer
to select a connection which is already closed (concurrently) but the
close signal has not yet been seen by the LoadBalancer
. In such cases, requests fail with a
RetryableException
. By default, automatic retries always retries these RetryableException
s.
This method disables the default behavior.this
.public DefaultAutoRetryStrategyProvider.Builder maxRetries(int maxRetries)
maxRetries
- Maximum number of automatic retries done for any request.this
.public AutoRetryStrategyProvider build()
AutoRetryStrategyProvider
.AutoRetryStrategyProvider
.