33 namespace ConflatedTCP {
54 SessionSettings&
sessionId(
const std::string & value);
66 SessionSettings&
firmId(
const std::string & value);
78 SessionSettings&
accessKey(
const std::string & value);
90 SessionSettings&
secretKey(
const std::string & value);
97 return threadingModel_;
112 return receiveSpinningTimeout_;
125 return sendSpinningTimeout_;
141 return messageGrouping_;
157 SessionSettings&
licenseStore(
const std::string & value);
168 return licenseStores_;
176 return licenseAlertingDaysBeforeExpiration_;
187 licenseAlertingDaysBeforeExpiration_ = days;
196 return localNetworkInterface_;
216 SessionSettings&
logFileName(
const std::string & value);
225 return storageDirectory_;
239 return localTimeUsage_;
253 return fileBasedStorageSegmentSize_;
265 return asyncFileBasedStorageQueueMaxSize_;
277 return asyncFileBasedStorageThreadAffinity_;
292 return ignoreFileBasedStorageIntegrityErrors_;
304 return logBeforeSending_;
318 return reconnectAttempts_;
330 return reconnectInterval_;
345 return socketReceiveBufferSize_;
360 return reasonableTransmissionTime_;
372 return socketSendBufferSize_;
385 return threadPoolAffinity_;
395 return threadPoolPriority_;
405 return threadPoolPolicy_;
417 return tcpNoDelayOption_;
429 return threadPoolSize_;
442 return keepAliveInterval_;
456 SessionSettings&
load(
const std::string& configFile);
465 static const bool CreateLogFile =
true;
466 static const int KeepAliveInterval = 30000;
467 static const bool LogBeforeSending =
true;
470 static const bool TcpNoDelayOption =
true;
471 static const int ReceiveSpinningTimeout = 0;
472 static const int SendSpinningTimeout = 0;
473 static const char LicenseStore[] ;
474 static const unsigned LicenseAlertingDaysBeforeExpiration = 0;
475 static const char LogDir[];
476 static const char LogFileName[];
477 static const bool LocalTimeUsage =
false;
478 static const unsigned MessageGrouping = 0;
479 static const int ReasonableTransmissionTime = 20;
480 static const int ReconnectAttempts = 3;
481 static const int ReconnectInterval = 180;
482 static const unsigned long long FileBasedStorageSegmentSize = 0;
483 static const bool IgnoreFileBasedStorageIntegrityErrors =
false;
484 static const int ThreadPoolSize = 0;
485 static const unsigned AsyncFileBasedStorageQueueMaxSize = UINT_MAX;
525 void processLicenseStores(
const std::string& licenseStore);
527 std::string accessKey_;
529 unsigned asyncFileBasedStorageQueueMaxSize_;
531 CpuIndexes asyncFileBasedStorageThreadAffinity_;
533 bool createEngineLogFile_;
539 bool ignoreFileBasedStorageIntegrityErrors_;
541 unsigned keepAliveInterval_;
543 unsigned licenseAlertingDaysBeforeExpiration_;
545 std::string licenseFilePath_;
547 LicenseStores licenseStores_;
549 std::string localNetworkInterface_;
551 bool localTimeUsage_;
553 bool logBeforeSending_;
555 std::string logFileName_;
557 unsigned messageGrouping_;
559 unsigned reasonableTransmissionTime_;
561 int receiveSpinningTimeout_;
563 unsigned reconnectAttempts_;
565 unsigned reconnectInterval_;
567 std::string secretKey_;
569 int sendSpinningTimeout_;
571 std::string sessionId_;
573 int socketReceiveBufferSize_;
575 int socketSendBufferSize_;
577 std::string storageDirectory_;
579 bool tcpNoDelayOption_;
585 int threadPoolPolicy_;
587 int threadPoolPriority_;
589 unsigned threadPoolSize_;
static const unsigned MaxSpinningTimeoutUsec
The maximum spinning timeout (microseconds).
static const char * LicenseFile
= "LicenseFile"
const CpuIndexes & threadPoolAffinity() const
static const char * LogFileName
= "Log.FileName"
const std::string & firmId() const
const std::string & sessionId() const
unsigned receiveSpinningTimeout() const
bool localTimeUsage() const
static const char * KeepAliveInterval
= "KeepAliveInterval"
SessionSettings & addLicenseStore(const std::string &value)
Adds the path to the folder that contains license file(s).
static const char * SessionId
= "SessionId"
static const char * FileBasedStorageSegmentSize
= "FileBasedStorageSegmentSize"
static const char * LocalTimeUsage
= "LocalTimeUsage"
Each session has a sender thread and a receiving thread.
unsigned threadPoolSize() const
Default session settings.
const LicenseStores & licenseStores() const
const std::string & localNetworkInterface() const
const CpuIndexes & asyncFileBasedStorageThreadAffinity() const
static const char * StorageDirectory
= "Log.Directory"
static const char * ThreadPoolPolicy
= "ThreadPool.Policy"
#define ONIXS_CONFLATEDTCP_EXPORTED
SessionSettings & resetToDefaults()
Resets the settings to the default values.
static const char * LocalNetworkInterface
= "LocalNetworkInterface"
static const char * ReconnectInterval
= "Reconnect.Interval"
static const char * SendSpinningTimeout
= "SendSpinningTimeout"
unsigned licenseAlertingDaysBeforeExpiration() const
unsigned reasonableTransmissionTime() const
int threadPoolPolicy() const
static const char * TcpNoDelayOption
= "TcpNoDelayOption"
static const char * SecretKey
= "SecretKey"
static const char * LogBeforeSending
= "Log.BeforeSending"
static const char * LicenseStore
= "LicenseStore"
static const int UseOsDefaultSocketBufferSize
Specifies the usage of the operating system default socket buffer size.
static const char * LicenseAlertingDaysBeforeExpiration
= "LicenseAlertingDaysBeforeExpiration"
static const char * SocketSendBufferSize
= "Socket.SendBufferSize"
static const char * ReasonableTransmissionTime
= "ReasonableTransmissionTime"
unsigned reconnectInterval() const
const std::string & secretKey() const
SessionSettings & load(const std::string &configFile)
Loads the settings from the given configuration file.
static const char * ThreadPoolAffinity
= "ThreadPool.Affinity"
static const char * SocketReceiveBufferSize
= "Socket.ReceiveBufferSize"
unsigned keepAliveInterval() const
std::set< CpuIndex > CpuIndexes
#define ONIXS_CONFLATEDTCP_NODISCARD
SessionSettings & licenseAlertingDaysBeforeExpiration(unsigned days)
Sets the number of days to alert before the license expiration.
unsigned messageGrouping() const
unsigned reconnectAttempts() const
static const char * ReceiveSpinningTimeout
= "ReceiveSpinningTimeout"
const std::string & logFileName() const
static const char * ThreadingModel
= "ThreadingModel"
int socketSendBufferSize() const
const std::string & accessKey() const
bool tcpNoDelayOption() const
static const char * IgnoreFileBasedStorageIntegrityErrors
= "IgnoreFileBasedStorageIntegrityErrors"
unsigned sendSpinningTimeout() const
static const char * FirmId
= "FirmId"
static const char * ReconnectAttempts
= "Reconnect.Attempts"
int socketReceiveBufferSize() const
The keys that are used to load settings from the configuration file.
Messaging::UInt64 fileBasedStorageSegmentSize() const
bool ignoreFileBasedStorageIntegrityErrors() const
static const char * ThreadPoolSize
= "ThreadPool.Size"
const std::string & storageDirectory() const
static const char * ThreadPoolPriority
= "ThreadPool.Priority"
ThreadingModel::Enum threadingModel() const
std::string toString() const
bool logBeforeSending() const
static const char * AccessKey
= "AccessKey"
int threadPoolPriority() const
static const char * MessageGrouping
= "MessageGrouping"
static const char * AsyncFileBasedStorageThreadAffinity
= "AsyncFileBasedStorage.ThreadAffinity"
unsigned asyncFileBasedStorageQueueMaxSize() const
std::vector< std::string > LicenseStores
Folders that contain license file(s).
static const char * AsyncFileBasedStorageQueueMaxSize
= "AsyncFileBasedStorage.QueueMaxSize"
SessionSettings & licenseStore(const std::string &value)
Sets the path to the folder that contains license file(s).