20#include <unordered_map>
22#include "hazelcast/util/export.h"
23#include "hazelcast/util/IOUtil.h"
25#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
27#pragma warning(disable : 4251)
39class HAZELCAST_API client_property
42 client_property(
const std::string& name,
const std::string& default_value);
44 const std::string& get_name()
const;
46 const std::string& get_default_value()
const;
58 std::string default_value_;
66class HAZELCAST_API client_properties
70 const std::unordered_map<std::string, std::string>& properties);
114 static const std::string PROP_HEARTBEAT_TIMEOUT_DEFAULT;
124 static const std::string PROP_HEARTBEAT_INTERVAL_DEFAULT;
136 static const std::string PROP_REQUEST_RETRY_COUNT_DEFAULT;
148 static const std::string PROP_REQUEST_RETRY_WAIT_TIME_DEFAULT;
158 static const std::string PROP_AWS_MEMBER_PORT_DEFAULT;
164 static const std::string INVOCATION_RETRY_PAUSE_MILLIS_DEFAULT;
178 static const std::string INVOCATION_TIMEOUT_SECONDS_DEFAULT;
184 static const std::string EVENT_THREAD_COUNT_DEFAULT;
186 static const std::string INTERNAL_EXECUTOR_POOL_SIZE;
187 static const std::string INTERNAL_EXECUTOR_POOL_SIZE_DEFAULT;
195 static const std::string SHUFFLE_MEMBER_LIST_DEFAULT;
207 static const std::string MAX_CONCURRENT_INVOCATIONS_DEFAULT;
221 static const std::string BACKPRESSURE_BACKOFF_TIMEOUT_MILLIS_DEFAULT;
229 static const std::string STATISTICS_ENABLED_DEFAULT;
235 static const std::string STATISTICS_PERIOD_SECONDS_DEFAULT;
244 "hazelcast.client.operation.backup.timeout.millis";
245 static constexpr const char* OPERATION_BACKUP_TIMEOUT_MILLIS_DEFAULT =
257 "hazelcast.client.operation.fail.on.indeterminate.state";
258 static constexpr const char* FAIL_ON_INDETERMINATE_OPERATION_STATE_DEFAULT =
266 static constexpr const char* CLOUD_URL_BASE_DEFAULT =
267 "api.viridian.hazelcast.com";
278 "hazelcast.client.sql.partition.argument.cache.size";
279 static constexpr const char* PARTITION_ARGUMENT_CACHE_SIZE_DEFAULT =
"1024";
333 std::unordered_map<std::string, std::string> properties_map_;
339#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
hazelcast_client configuration class.
static const std::string PROP_HEARTBEAT_INTERVAL
Time interval in milliseconds between the heartbeats sent by the client to the nodes.
static const std::string PROP_REQUEST_RETRY_COUNT
Client will retry requests which either inherently retryable(idempotentclient) or client_network_conf...
static const std::string PROP_REQUEST_RETRY_WAIT_TIME
Client will retry requests which either inherently retryable(idempotentclient) or client_network_conf...
static const std::string MAX_CONCURRENT_INVOCATIONS
The maximum number of concurrent invocations allowed.
static const std::string SHUFFLE_MEMBER_LIST
Client shuffles the given member list to prevent all clients to connect to the same node when this pr...
static const std::string STATISTICS_PERIOD_SECONDS
The period in seconds the statistics sent to the cluster.
static const std::string EVENT_THREAD_COUNT
Number of the threads to handle the incoming event packets.
static constexpr const char * PARTITION_ARGUMENT_CACHE_SIZE
Parametrized SQL queries touching only a single partition benefit from using the partition owner as t...
static const std::string STATISTICS_ENABLED
Use to enable the client statistics collection.
static const std::string INVOCATION_RETRY_PAUSE_MILLIS
Pause time between each retry cycle of an invocation in milliseconds.
static constexpr const char * FAIL_ON_INDETERMINATE_OPERATION_STATE
When this configuration is enabled, if an operation has sync backups and acks are not received from b...
static constexpr const char * OPERATION_BACKUP_TIMEOUT_MILLIS
If an operation has backups, this property specifies how long the invocation will wait for acks from ...
std::string get_string(const client_property &property) const
Returns the configured value of a ClientProperty as std::string.
int32_t get_integer(const client_property &property) const
Returns the configured int32_t value of a ClientProperty.
static const std::string PROP_AWS_MEMBER_PORT
The discovery mechanism will discover only IP addresses.
static const std::string PROP_HEARTBEAT_TIMEOUT
Client will be sending heartbeat messages to members and this is the timeout.
static const std::string INVOCATION_TIMEOUT_SECONDS
When an invocation gets an exception because :
bool get_boolean(const client_property &property) const
Returns the configured boolean value of a ClientProperty.
int64_t get_long(const client_property &property) const
Returns the configured int64_t value of a ClientProperty.
static const std::string BACKPRESSURE_BACKOFF_TIMEOUT_MILLIS
Control the maximum timeout in millis to wait for an invocation space to be available.
static constexpr const char * CLOUD_URL_BASE
Internal client property to change base url of cloud discovery endpoint.
A client property is a configuration for hazelcast client.
const char * get_system_property() const
Gets the system environment property value of the property.