Hazelcast C++ Client
Hazelcast C++ Client Library
Loading...
Searching...
No Matches
hazelcast::client::client_property Class Reference

A client property is a configuration for hazelcast client. More...

#include <client_properties.h>

Public Member Functions

 client_property (const std::string &name, const std::string &default_value)
const std::string & get_name () const
const std::string & get_default_value () const
const char * get_system_property () const
 Gets the system environment property value of the property.

Detailed Description

A client property is a configuration for hazelcast client.

For available configurations see client_properties class.

Definition at line 39 of file client_properties.h.

Constructor & Destructor Documentation

◆ client_property()

hazelcast::client::client_property::client_property ( const std::string & name,
const std::string & default_value )

Definition at line 1009 of file client_impl.cpp.

1011 : name_(name)
1012 , default_value_(default_value)
1013{}

Member Function Documentation

◆ get_default_value()

const std::string & hazelcast::client::client_property::get_default_value ( ) const

Definition at line 1022 of file client_impl.cpp.

1023{
1024 return default_value_;
1025}

◆ get_name()

const std::string & hazelcast::client::client_property::get_name ( ) const

Definition at line 1016 of file client_impl.cpp.

1017{
1018 return name_;
1019}

◆ get_system_property()

const char * hazelcast::client::client_property::get_system_property ( ) const

Gets the system environment property value of the property.

Returns
the value of the property. NULL if no such environment property exist.

Definition at line 1028 of file client_impl.cpp.

1029{
1030#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
1031#pragma warning(push)
1032#pragma warning( \
1033 disable : 4996) // for 'getenv': This function or variable may be unsafe.
1034#endif
1035 return std::getenv(name_.c_str());
1036#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
1037#pragma warning(pop)
1038#endif
1039}

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