Hazelcast C++ Client
Public Member Functions | List of all members
hazelcast::client::config::connection_retry_config Class Reference

Connection Retry Config is controls the period among the retries and when should a client gave up retrying. More...

#include <connection_retry_config.h>

Public Member Functions

std::chrono::milliseconds get_initial_backoff_duration () const
 how long to wait after the first failure before retrying More...
 
connection_retry_configset_initial_backoff_duration (std::chrono::milliseconds initial_backoff_duration)
 
std::chrono::milliseconds get_max_backoff_duration () const
 When backoff reaches this upper bound, it does not increase any more. More...
 
connection_retry_configset_max_backoff_duration (std::chrono::milliseconds max_backoff_duration)
 When backoff reaches this upper bound, it does not increase any more. More...
 
double get_multiplier () const
 factor with which to multiply backoff time after a failed retry More...
 
connection_retry_configset_multiplier (double multiplier)
 
std::chrono::milliseconds get_cluster_connect_timeout () const
 Timeout value for the client to give up to connect to the current cluster Theclient can shutdown after reaching the timeout. More...
 
connection_retry_configset_cluster_connect_timeout (std::chrono::milliseconds cluster_connect_timeout)
 
double get_jitter () const
 by how much to randomize backoffs. More...
 
connection_retry_configset_jitter (double jitter)
 At each iteration calculated back-off is randomized via following method random(-jitter * current_backoff, jitter * current_backoff) More...
 

Detailed Description

Connection Retry Config is controls the period among the retries and when should a client gave up retrying.

Exponential behaviour can be chosen or jitter can be added to wait periods.

Member Function Documentation

◆ get_cluster_connect_timeout()

std::chrono::milliseconds hazelcast::client::config::connection_retry_config::get_cluster_connect_timeout ( ) const

Timeout value for the client to give up to connect to the current cluster Theclient can shutdown after reaching the timeout.

Returns
cluster_connect_timeout_

◆ get_initial_backoff_duration()

std::chrono::milliseconds hazelcast::client::config::connection_retry_config::get_initial_backoff_duration ( ) const

how long to wait after the first failure before retrying

Returns
initial_backoff_duration_

◆ get_jitter()

double hazelcast::client::config::connection_retry_config::get_jitter ( ) const

by how much to randomize backoffs.

At each iteration calculated back-off is randomized via following method random(-jitter * current_backoff, jitter * current_backoff)

Returns
jitter_

◆ get_max_backoff_duration()

std::chrono::milliseconds hazelcast::client::config::connection_retry_config::get_max_backoff_duration ( ) const

When backoff reaches this upper bound, it does not increase any more.

Returns
max_backoff_duration_

◆ get_multiplier()

double hazelcast::client::config::connection_retry_config::get_multiplier ( ) const

factor with which to multiply backoff time after a failed retry

Returns
multiplier_

◆ set_cluster_connect_timeout()

connection_retry_config & hazelcast::client::config::connection_retry_config::set_cluster_connect_timeout ( std::chrono::milliseconds  cluster_connect_timeout)
Parameters
cluster_connect_timeouttimeout for the client to give up to connect to the current cluster The client can shutdown after reaching the timeout.
Returns
updated connection_retry_config

◆ set_initial_backoff_duration()

connection_retry_config & hazelcast::client::config::connection_retry_config::set_initial_backoff_duration ( std::chrono::milliseconds  initial_backoff_duration)
Parameters
initial_backoff_durationhow long to wait after the first failure before retrying
Returns
updated connection_retry_config

◆ set_jitter()

connection_retry_config & hazelcast::client::config::connection_retry_config::set_jitter ( double  jitter)

At each iteration calculated back-off is randomized via following method random(-jitter * current_backoff, jitter * current_backoff)

Parameters
jitterby how much to randomize backoffs
Returns
updated connection_retry_config

◆ set_max_backoff_duration()

connection_retry_config & hazelcast::client::config::connection_retry_config::set_max_backoff_duration ( std::chrono::milliseconds  max_backoff_duration)

When backoff reaches this upper bound, it does not increase any more.

Parameters
max_backoff_durationupper bound on backoff
Returns
updated connection_retry_config

◆ set_multiplier()

connection_retry_config & hazelcast::client::config::connection_retry_config::set_multiplier ( double  multiplier)
Parameters
multiplierfactor with which to multiply backoff after a failed retry
Returns
updated connection_retry_config

The documentation for this class was generated from the following files: