Hazelcast C++ Client
|
Contains configuration parameters for client network related behaviour. More...
#include <ClientNetworkConfig.h>
Public Member Functions | |
ClientNetworkConfig () | |
Constructor with default values. More... | |
SSLConfig & | getSSLConfig () |
Returns the current SSLConfig. More... | |
ClientNetworkConfig & | setSSLConfig (const config::SSLConfig &sslConfig) |
Sets the SSLConfig. More... | |
ClientNetworkConfig & | setConnectionTimeout (int64_t connectionTimeoutInMillis) |
int64_t | getConnectionTimeout () const |
Timeout value for nodes to accept client connection requests. More... | |
ClientNetworkConfig & | setAwsConfig (const ClientAwsConfig &clientAwsConfig) |
Sets configuration to connect nodes in aws environment. More... | |
ClientAwsConfig & | getAwsConfig () |
Returns the current ClientAwsConfig. More... | |
bool | isSmartRouting () const |
See com.hazelcast.client.config.ClientNetworkConfig#setSmartRouting(boolean) for details. More... | |
ClientNetworkConfig & | setSmartRouting (bool smartRouting) |
If. More... | |
int32_t | getConnectionAttemptLimit () const |
See ClientNetworkConfig#setConnectionAttemptLimit(int32_t) for details. More... | |
ClientNetworkConfig & | setConnectionAttemptLimit (int32_t connectionAttemptLimit) |
While client is trying to connect initially to one of the members in the ClientNetworkConfig#addressList, all might be not available. More... | |
int32_t | getConnectionAttemptPeriod () const |
Period for the next attempt to find a member to connect. More... | |
ClientNetworkConfig & | setConnectionAttemptPeriod (int32_t connectionAttemptPeriod) |
Period for the next attempt to find a member to connect. More... | |
std::vector< Address > | getAddresses () const |
Returns the list of candidate addresses that client will use to establish initial connection. More... | |
ClientNetworkConfig & | addAddresses (const std::vector< Address > &addresses) |
Adds given addresses to candidate address list that client will use to establish initial connection. More... | |
ClientNetworkConfig & | setAddresses (const std::vector< Address > &addresses) |
Adds given addresses to candidate address list that client will use to establish initial connection. More... | |
ClientNetworkConfig & | addAddress (const Address &address) |
Adds given address to candidate address list that client will use to establish initial connection. More... | |
SocketOptions & | getSocketOptions () |
Contains configuration parameters for client network related behaviour.
hazelcast::client::config::ClientNetworkConfig::ClientNetworkConfig | ( | ) |
Constructor with default values.
connectionTimeout(5000)
ClientNetworkConfig & hazelcast::client::config::ClientNetworkConfig::addAddress | ( | const Address & | address | ) |
Adds given address to candidate address list that client will use to establish initial connection.
address | to be added to initial address list |
ClientNetworkConfig & hazelcast::client::config::ClientNetworkConfig::addAddresses | ( | const std::vector< Address > & | addresses | ) |
Adds given addresses to candidate address list that client will use to establish initial connection.
addresses | to be added to initial address list |
std::vector< Address > hazelcast::client::config::ClientNetworkConfig::getAddresses | ( | ) | const |
Returns the list of candidate addresses that client will use to establish initial connection.
ClientAwsConfig & hazelcast::client::config::ClientNetworkConfig::getAwsConfig | ( | ) |
Returns the current ClientAwsConfig.
int32_t hazelcast::client::config::ClientNetworkConfig::getConnectionAttemptLimit | ( | ) | const |
See ClientNetworkConfig#setConnectionAttemptLimit(int32_t) for details.
int32_t hazelcast::client::config::ClientNetworkConfig::getConnectionAttemptPeriod | ( | ) | const |
Period for the next attempt to find a member to connect.
See ClientNetworkConfig#connectionAttemptLimit.
int64_t hazelcast::client::config::ClientNetworkConfig::getConnectionTimeout | ( | ) | const |
Timeout value for nodes to accept client connection requests.
SSLConfig & hazelcast::client::config::ClientNetworkConfig::getSSLConfig | ( | ) |
bool hazelcast::client::config::ClientNetworkConfig::isSmartRouting | ( | ) | const |
See com.hazelcast.client.config.ClientNetworkConfig#setSmartRouting(boolean) for details.
ClientNetworkConfig & hazelcast::client::config::ClientNetworkConfig::setAddresses | ( | const std::vector< Address > & | addresses | ) |
Adds given addresses to candidate address list that client will use to establish initial connection.
addresses | to be added to initial address list |
ClientNetworkConfig & hazelcast::client::config::ClientNetworkConfig::setAwsConfig | ( | const ClientAwsConfig & | clientAwsConfig | ) |
Sets configuration to connect nodes in aws environment.
clientAwsConfig | the ClientAwsConfig |
ClientNetworkConfig & hazelcast::client::config::ClientNetworkConfig::setConnectionAttemptLimit | ( | int32_t | connectionAttemptLimit | ) |
While client is trying to connect initially to one of the members in the ClientNetworkConfig#addressList, all might be not available.
Instead of giving up, throwing Exception and stopping client, it will attempt to retry as much as ClientNetworkConfig#connectionAttemptLimit times.
connectionAttemptLimit | number of times to attempt to connect A zero value means try forever. A negative value means default value |
ClientNetworkConfig & hazelcast::client::config::ClientNetworkConfig::setConnectionAttemptPeriod | ( | int32_t | connectionAttemptPeriod | ) |
Period for the next attempt to find a member to connect.
connectionAttemptPeriod | time to wait before another attempt in millis |
ClientNetworkConfig & hazelcast::client::config::ClientNetworkConfig::setConnectionTimeout | ( | int64_t | connectionTimeoutInMillis | ) |
connectionTimeout | Timeout value in millis for nodes to accept client connection requests. A zero value means wait until connection established or an error occurs. |
ClientNetworkConfig & hazelcast::client::config::ClientNetworkConfig::setSmartRouting | ( | bool | smartRouting | ) |
If.
, client will route the key based operations to owner of the key on best-effort basis. Note that it uses a cached version of com.hazelcast.core.PartitionService#getPartitions() and doesn't guarantee that the operation will always be executed on the owner. The cached table is updated every 10 seconds.
If
, all operations will be routed to single member. Operations will need two hops if the chosen member is not owner of the key. Client will have only single open connection. Useful, if there are many clients and we want to avoid each of them connecting to each member.
Default value is
.
smartRouting | true if smart routing should be enabled. |
ClientNetworkConfig & hazelcast::client::config::ClientNetworkConfig::setSSLConfig | ( | const config::SSLConfig & | sslConfig | ) |
Sets the SSLConfig.
sslConfig | the SSLConfig. |