public class ConnectionRetryConfig extends Object
Constructor and Description |
---|
ConnectionRetryConfig() |
ConnectionRetryConfig(ConnectionRetryConfig connectionRetryConfig) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getInitialBackoffMillis()
how long to wait after the first failure before retrying
|
double |
getJitter()
by how much to randomize backoffs.
|
int |
getMaxBackoffMillis()
When backoff reaches this upper bound, it does not increase any more.
|
double |
getMultiplier()
factor with which to multiply backoff after a failed retry
|
int |
hashCode() |
boolean |
isEnabled()
enables connection retry logic.
|
boolean |
isFailOnMaxBackoff()
whether to fail when the max-backoff has reached or continue waiting max-backoff-millis at each iteration
When on fail, client shuts down.
|
ConnectionRetryConfig |
setEnabled(boolean enabled)
enables connection retry logic.
|
ConnectionRetryConfig |
setFailOnMaxBackoff(boolean failOnMaxBackoff) |
ConnectionRetryConfig |
setInitialBackoffMillis(int initialBackoffMillis) |
ConnectionRetryConfig |
setJitter(double jitter)
At each iteration calculated back-off is randomized via following method
Random(-jitter * current_backoff, jitter * current_backoff)
|
ConnectionRetryConfig |
setMaxBackoffMillis(int maxBackoffMillis)
When backoff reaches this upper bound, it does not increase any more.
|
ConnectionRetryConfig |
setMultiplier(double multiplier) |
public ConnectionRetryConfig()
public ConnectionRetryConfig(ConnectionRetryConfig connectionRetryConfig)
public int getInitialBackoffMillis()
public ConnectionRetryConfig setInitialBackoffMillis(int initialBackoffMillis)
initialBackoffMillis
- how long to wait after the first failure before retryingpublic int getMaxBackoffMillis()
public ConnectionRetryConfig setMaxBackoffMillis(int maxBackoffMillis)
maxBackoffMillis
- upper bound on backoffpublic double getMultiplier()
public ConnectionRetryConfig setMultiplier(double multiplier)
multiplier
- factor with which to multiply backoff after a failed retrypublic boolean isFailOnMaxBackoff()
public ConnectionRetryConfig setFailOnMaxBackoff(boolean failOnMaxBackoff)
failOnMaxBackoff
- whether to fail when the max-backoff has reached or
continue waiting max-backoff-millis at each iterationpublic double getJitter()
public ConnectionRetryConfig setJitter(double jitter)
jitter
- by how much to randomize backoffspublic boolean isEnabled()
ClientNetworkConfig.getConnectionAttemptLimit()
ClientNetworkConfig.getConnectionAttemptPeriod()
()}public ConnectionRetryConfig setEnabled(boolean enabled)
ClientNetworkConfig.getConnectionAttemptLimit()
ClientNetworkConfig.getConnectionAttemptPeriod()
()}enabled
- Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.