![]() |
Hazelcast C++ Client
Hazelcast C++ Client Library
|
Contains configuration parameters for client network related behaviour. More...
#include <client_network_config.h>
Public Member Functions | |
client_network_config () | |
Constructor with default values. | |
ssl_config & | get_ssl_config () |
Returns the current \ssl_config . | |
client_network_config & | set_ssl_config (const config::ssl_config &config) |
Sets the ssl_config. | |
client_network_config & | set_connection_timeout (const std::chrono::milliseconds &timeout) |
std::chrono::milliseconds | get_connection_timeout () const |
Connection timeout value for connecting to a member server. | |
client_network_config & | set_aws_config (const client_aws_config &client_aws_config) |
Sets configuration to connect nodes in aws environment. | |
client_aws_config & | get_aws_config () |
Returns the current client_aws_config. | |
cloud_config & | get_cloud_config () |
Returns the current cloud_config. | |
bool | is_smart_routing () const |
See client_network_config#setSmartRouting(boolean) for details. | |
client_network_config & | set_smart_routing (bool smart_routing) |
If true , client will route the key based operations to owner of the key on best-effort basis. | |
std::vector< address > | get_addresses () const |
Returns the list of candidate addresses that client will use to establish initial connection. | |
client_network_config & | add_addresses (const std::vector< address > &addresses) |
Adds given addresses to candidate address list that client will use to establish initial connection. | |
client_network_config & | set_addresses (const std::vector< address > &addresses) |
Adds given addresses to candidate address list that client will use to establish initial connection. | |
client_network_config & | add_address (const address &address) |
Adds given address to candidate address list that client will use to establish initial connection. | |
socket_options & | get_socket_options () |
bool | use_public_address () const |
client_network_config & | use_public_address (bool should_use_public_address) |
Contains configuration parameters for client network related behaviour.
Definition at line 35 of file client_network_config.h.
hazelcast::client::config::client_network_config::client_network_config | ( | ) |
Constructor with default values.
connectionTimeout(5000)
Definition at line 319 of file config.cpp.
client_network_config & hazelcast::client::config::client_network_config::add_address | ( | 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 |
Definition at line 398 of file config.cpp.
client_network_config & hazelcast::client::config::client_network_config::add_addresses | ( | 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 |
Definition at line 383 of file config.cpp.
std::vector< address > hazelcast::client::config::client_network_config::get_addresses | ( | ) | const |
Returns the list of candidate addresses that client will use to establish initial connection.
Definition at line 377 of file config.cpp.
client_aws_config & hazelcast::client::config::client_network_config::get_aws_config | ( | ) |
Returns the current client_aws_config.
Definition at line 352 of file config.cpp.
cloud_config & hazelcast::client::config::client_network_config::get_cloud_config | ( | ) |
Returns the current cloud_config.
Definition at line 358 of file config.cpp.
std::chrono::milliseconds hazelcast::client::config::client_network_config::get_connection_timeout | ( | ) | const |
Connection timeout value for connecting to a member server.
Definition at line 338 of file config.cpp.
socket_options & hazelcast::client::config::client_network_config::get_socket_options | ( | ) |
Definition at line 405 of file config.cpp.
ssl_config & hazelcast::client::config::client_network_config::get_ssl_config | ( | ) |
Returns the current \ssl_config .
Definition at line 325 of file config.cpp.
bool hazelcast::client::config::client_network_config::is_smart_routing | ( | ) | const |
See client_network_config#setSmartRouting(boolean) for details.
Definition at line 364 of file config.cpp.
client_network_config & hazelcast::client::config::client_network_config::set_addresses | ( | 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 |
Definition at line 391 of file config.cpp.
client_network_config & hazelcast::client::config::client_network_config::set_aws_config | ( | const client_aws_config & | client_aws_config | ) |
Sets configuration to connect nodes in aws environment.
clientAwsConfig | the client_aws_config |
Definition at line 344 of file config.cpp.
client_network_config & hazelcast::client::config::client_network_config::set_connection_timeout | ( | const std::chrono::milliseconds & | timeout | ) |
connectionTimeout | Timeout value for nodes to accept client connection requests. A zero value means wait until connection established or an error occurs. The resolution of time is up to milliseconds. |
Definition at line 411 of file config.cpp.
client_network_config & hazelcast::client::config::client_network_config::set_smart_routing | ( | bool | smart_routing | ) |
If true
, client will route the key based operations to owner of the key on best-effort basis.
Note that it uses a cached version of 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 smartRouting == false
, 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 true
.
smartRouting | true if smart routing should be enabled. |
Definition at line 370 of file config.cpp.
client_network_config & hazelcast::client::config::client_network_config::set_ssl_config | ( | const config::ssl_config & | config | ) |
Sets the ssl_config.
config | the ssl_config . |
Definition at line 331 of file config.cpp.
bool hazelcast::client::config::client_network_config::use_public_address | ( | ) | const |
Definition at line 419 of file config.cpp.
client_network_config & hazelcast::client::config::client_network_config::use_public_address | ( | bool | should_use_public_address | ) |
should_use_public_address | true mean force usage of the public address of the server when connecting to the server. Otherwise, set to false to use the private address. Default is false. |
Definition at line 425 of file config.cpp.