public class ConnectionRetryConfig extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_CLUSTER_CONNECT_TIMEOUT_MILLISDefault value for the cluster connection timeout. | 
| static int | FAILOVER_CLIENT_DEFAULT_CLUSTER_CONNECT_TIMEOUT_MILLISTimeout used by the failover client to start trying to
 connect alternative clusters when the cluster connection
 timeout is equal to  DEFAULT_CLUSTER_CONNECT_TIMEOUT_MILLIS. | 
| Constructor and Description | 
|---|
| ConnectionRetryConfig() | 
| ConnectionRetryConfig(ConnectionRetryConfig connectionRetryConfig) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object o) | 
| long | getClusterConnectTimeoutMillis()Timeout value in milliseconds for the client to give up to connect to the current cluster
 Depending on FailoverConfig, a client can shutdown or start trying on alternative clusters
 after reaching the timeout. | 
| 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() | 
| ConnectionRetryConfig | setClusterConnectTimeoutMillis(long clusterConnectTimeoutMillis) | 
| 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) | 
| String | toString() | 
public static final int DEFAULT_CLUSTER_CONNECT_TIMEOUT_MILLIS
public static final int FAILOVER_CLIENT_DEFAULT_CLUSTER_CONNECT_TIMEOUT_MILLIS
DEFAULT_CLUSTER_CONNECT_TIMEOUT_MILLIS.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 long getClusterConnectTimeoutMillis()
-1, which is the default value,
 the client will not stop trying to connect to the cluster. If the failover client is used,
 for the default value, the client will start trying to connect alternative clusters after
 FAILOVER_CLIENT_DEFAULT_CLUSTER_CONNECT_TIMEOUT_MILLIS.
 For any other value, both the failover and non-failover client will use that as it is.public ConnectionRetryConfig setClusterConnectTimeoutMillis(long clusterConnectTimeoutMillis)
clusterConnectTimeoutMillis - timeout in milliseconds for the client to give up to connect to the current cluster
                                    Depending on FailoverConfig, a client can shutdown or start trying on alternative
                                    clusters after reaching the timeout. If set to -1, which is the default
                                    value, the client will not stop trying to connect to the cluster. If the
                                    failover client is used, for the default value, the client will start trying
                                    to connect alternative clusters after
                                    FAILOVER_CLIENT_DEFAULT_CLUSTER_CONNECT_TIMEOUT_MILLIS.
                                    For any other value, both the failover and non-failover client will use
                                    that as it is.public double getJitter()
public ConnectionRetryConfig setJitter(double jitter)
jitter - by how much to randomize backoffsCopyright © 2022 Hazelcast, Inc.. All rights reserved.