20#ifndef GEODE_SYSTEMPROPERTIES_H_
21#define GEODE_SYSTEMPROPERTIES_H_
24#include "util/LogLevel.hpp"
55 const std::string& configFile =
"");
68 uint32_t threadPoolSize()
const {
return m_threadPoolSize; }
75 return m_statisticsSampleInterval;
96 const std::string&
sslKeyStore()
const {
return m_sslKeyStore; }
102 return m_sslKeystorePassword;
115 return m_statisticsArchiveFile;
132 void setLogLevel(LogLevel newLogLevel) { m_logLevel = newLogLevel; }
169 const std::chrono::seconds&
pingInterval()
const {
return m_pingInterval; }
175 return m_redundancyMonitorInterval;
182 return m_notifyAckInterval;
190 return m_notifyDupCheckLife;
202 return m_durableTimeout;
209 return m_connectTimeout;
217 return m_connectWaitTimeout;
225 return m_bucketWaitTimeout;
233 const std::string& name()
const {
return m_name; }
235 const std::string& cacheXMLFile()
const {
return m_cacheXMLFile; }
257 uint32_t connectionPoolSize()
const {
return m_connectionPoolSize; }
258 void setjavaConnectionPoolSize(uint32_t size) { m_connectionPoolSize = size; }
269 m_enableChunkHandlerThread = set;
277 return m_onClientDisconnectClearPdxTypeIds;
285 m_onClientDisconnectClearPdxTypeIds = set;
293 "Diffie-Hellman based credentials encryption is not supported.")
294 const std::
string& securityClientDhAlgo()
const {
295 return m_securityClientDhAlgo;
299 const std::string& securityClientKsPath()
const {
300 return m_securityClientKsPath;
306 std::shared_ptr<Properties> getSecurityProperties()
const {
307 return m_securityPropertiesPtr;
313 inline bool isEndpointShufflingDisabled()
const {
314 return m_disableShufflingEndpoint;
322 "Diffie-Hellman based credentials encryption is not supported.")
323 bool isDhOn()
const {
return false; }
334 inline bool autoReadyForEvents()
const {
return m_autoReadyForEvents; }
339 const std::chrono::seconds suspendedTxTimeout()
const {
340 return m_suspendedTxTimeout;
346 const std::chrono::milliseconds tombstoneTimeout()
const {
347 return m_tombstoneTimeout;
351 std::chrono::milliseconds m_statisticsSampleInterval;
355 std::string m_statisticsArchiveFile;
357 std::string m_logFilename;
365 bool m_disableShufflingEndpoint;
367 std::string m_cacheXMLFile;
369 uint32_t m_logFileSizeLimit;
370 uint32_t m_logDiskSpaceLimit;
372 uint32_t m_statsFileSizeLimit;
373 uint32_t m_statsDiskSpaceLimit;
375 uint32_t m_connectionPoolSize;
377 int32_t m_heapLRULimit;
378 int32_t m_heapLRUDelta;
379 int32_t m_maxSocketBufferSize;
380 std::chrono::seconds m_pingInterval;
381 std::chrono::seconds m_redundancyMonitorInterval;
383 std::chrono::milliseconds m_notifyAckInterval;
384 std::chrono::milliseconds m_notifyDupCheckLife;
386 std::shared_ptr<Properties> m_securityPropertiesPtr;
388 std::string m_securityClientDhAlgo;
389 std::string m_securityClientKsPath;
391 std::string m_durableClientId;
392 std::chrono::seconds m_durableTimeout;
394 std::chrono::milliseconds m_connectTimeout;
395 std::chrono::milliseconds m_connectWaitTimeout;
396 std::chrono::milliseconds m_bucketWaitTimeout;
398 bool m_autoReadyForEvents;
401 bool m_timestatisticsEnabled;
402 std::string m_sslKeyStore;
403 std::string m_sslTrustStore;
405 std::string m_sslKeystorePassword;
407 std::string m_conflateEvents;
409 uint32_t m_threadPoolSize;
410 std::chrono::seconds m_suspendedTxTimeout;
411 std::chrono::milliseconds m_tombstoneTimeout;
412 bool m_enableChunkHandlerThread;
413 bool m_onClientDisconnectClearPdxTypeIds;
420 static bool parseBooleanProperty(
const std::string& property,
421 const std::string& value);
422 template <
class _Rep,
class _Period>
423 static void parseDurationProperty(
424 const std::string& property,
const std::string& value,
425 std::chrono::duration<_Rep, _Period>& duration);
427 [[noreturn]]
static void throwError(
const std::string& msg);
430 friend class DistributedSystemImpl;
The SystemProperties class.
Definition: SystemProperties.hpp:44
const std::string & logFilename() const
Returns the name of the filename into which logging would be done.
Definition: SystemProperties.hpp:122
_GEODE_DEPRECATED_("Diffie-Hellman based credentials encryption is not supported.") const std bool m_statisticsEnabled
Return the keystore (.pem file ) path.
Definition: SystemProperties.hpp:292
const std::chrono::milliseconds & notifyDupCheckLife() const
Returns the expiry time of an idle event id map entry for duplicate notification checking.
Definition: SystemProperties.hpp:189
size_t heapLRULimit() const
Returns the HeapLRULimit value (in bytes), the maximum memory that values in a cache can use to store...
Definition: SystemProperties.hpp:152
const std::chrono::seconds & redundancyMonitorInterval() const
Returns the time between two consecutive checks for redundancy for HA.
Definition: SystemProperties.hpp:174
uint32_t logFileSizeLimit() const
Returns the log-file-size-limit.
Definition: SystemProperties.hpp:240
SystemProperties(const std::shared_ptr< Properties > &propertiesPtr, const std::string &configFile="")
Constructor.
bool onClientDisconnectClearPdxTypeIds() const
Returns true if app wants to clear pdx type ids when client disconnect.
Definition: SystemProperties.hpp:276
bool sslEnabled() const
Whether SSL is enabled for socket connections.
Definition: SystemProperties.hpp:86
bool heapLRULimitEnabled() const
Returns a boolean that specifies if heapLRULimit has been enabled for the process.
Definition: SystemProperties.hpp:143
const std::string & conflateEvents() const
Returns client Queueconflation option.
Definition: SystemProperties.hpp:231
const std::chrono::milliseconds statisticsSampleInterval() const
Returns the sampling interval of the sampling thread.
Definition: SystemProperties.hpp:74
~SystemProperties()
Destructor.
const std::chrono::milliseconds & connectTimeout() const
Returns the connect timeout used for server and locator handshakes.
Definition: SystemProperties.hpp:208
uint32_t statsFileSizeLimit() const
Returns the stat-file-space-limit.
Definition: SystemProperties.hpp:250
const std::chrono::milliseconds & connectWaitTimeout() const
Returns the connect wait timeout(in milliseconds) used for to connect to server This is only applicab...
Definition: SystemProperties.hpp:216
void setLogLevel(LogLevel newLogLevel)
Changes the current log level to newLogLevel.
Definition: SystemProperties.hpp:132
const std::chrono::seconds & durableTimeout() const
Returns the durable timeout.
Definition: SystemProperties.hpp:201
const std::chrono::seconds & pingInterval() const
Returns the time between two consecutive pings to servers.
Definition: SystemProperties.hpp:169
const std::string & sslKeyStore() const
Returns the path of the private key file for SSL use.
Definition: SystemProperties.hpp:96
uint32_t logDiskSpaceLimit() const
Returns the log-disk-space-limit.
Definition: SystemProperties.hpp:245
bool statisticsEnabled() const
Tells whether statistics needs to be archived or not.
Definition: SystemProperties.hpp:81
const std::string & statisticsArchiveFile() const
Returns the name of the filename into which statistics would be archived.
Definition: SystemProperties.hpp:114
bool enableChunkHandlerThread() const
Returns true if chunk handler thread is enabled, false if not.
Definition: SystemProperties.hpp:263
int32_t heapLRUDelta() const
Returns the HeapLRUDelta value (a percent value).
Definition: SystemProperties.hpp:159
const std::chrono::milliseconds & notifyAckInterval() const
Returns the periodic notify ack interval.
Definition: SystemProperties.hpp:181
void processProperty(const std::string &property, const std::string &value)
Processes the given property/value pair, saving the results internally:
void setOnClientDisconnectClearPdxTypeIds(bool set)
Set to true if app wants to clear pdx type ids when client disconnect.
Definition: SystemProperties.hpp:284
const std::chrono::milliseconds & bucketWaitTimeout() const
Returns the connect wait timeout(in milliseconds) used for to connect to server This is only applicab...
Definition: SystemProperties.hpp:224
const std::string & durableClientId() const
Returns the durable client ID.
Definition: SystemProperties.hpp:196
LogLevel logLevel() const
Returns the log level at which logging would be done.
Definition: SystemProperties.hpp:127
uint32_t statsDiskSpaceLimit() const
Returns the stat-disk-size-limit.
Definition: SystemProperties.hpp:255
bool getEnableTimeStatistics() const
Whether time stats are enabled for the statistics.
Definition: SystemProperties.hpp:91
const std::string & sslKeystorePassword() const
Returns the client keystore password.
Definition: SystemProperties.hpp:101
const std::string & sslTrustStore() const
Returns the path of the public key file for SSL use.
Definition: SystemProperties.hpp:108
void logSettings()
print all settings to the process log.
int32_t maxSocketBufferSize() const
Returns the maximum socket buffer size to use.
Definition: SystemProperties.hpp:164
void setEnableChunkHandlerThread(bool set)
Enables or disables the chunk handler thread.
Definition: SystemProperties.hpp:268