OnixS C++ CME iLink 3 Binary Order Entry Handler  1.18.9
API Documentation
SessionSettings.h
Go to the documentation of this file.
1 /*
2  * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3  *
4  * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5  * and international copyright treaties.
6  *
7  * Access to and use of the software is governed by the terms of the applicable OnixS Software
8  * Services Agreement (the Agreement) and Customer end user license agreements granting
9  * a non-assignable, non-transferable and non-exclusive license to use the software
10  * for it's own data processing purposes under the terms defined in the Agreement.
11  *
12  * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13  * of this source code or associated reference material to any other location for further reproduction
14  * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15  *
16  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17  * the terms of the Agreement is a violation of copyright law.
18  */
19 
20 #pragma once
21 
22 #include <OnixS/CME/iLink3/ABI.h>
25 
26 #include <climits>
27 #include <set>
28 #include <string>
29 #include <vector>
30 
31 namespace OnixS {
32 namespace CME {
33 namespace iLink3 {
34 
35 /**
36  * Session settings.
37  */
39 {
40 public:
43 
44  /// \return the session id that was assigned by the exchange.
45  ///
46  /// The default value is empty.
48  const std::string & sessionId() const ONIXS_ILINK3_NOTHROW {
49  return sessionId_;
50  }
51 
52  /// Sets the session id that was assigned by the exchange.
54  SessionSettings& sessionId(const std::string & value);
55 
56  /// \return the firm id that was assigned by the exchange.
57  ///
58  /// The default value is empty.
60  const std::string & firmId() const ONIXS_ILINK3_NOTHROW {
61  return firmId_;
62  }
63 
64  /// Sets the firm id that was assigned by the exchange.
66  SessionSettings& firmId(const std::string & value);
67 
68  /// \return the access key that was assigned by the exchange.
69  ///
70  /// The default value is empty.
72  const std::string & accessKey() const ONIXS_ILINK3_NOTHROW {
73  return accessKey_;
74  }
75 
76  /// Sets the access key that was assigned by the exchange.
78  SessionSettings& accessKey(const std::string & value);
79 
80  /// \return the secret key that was assigned by the exchange.
81  ///
82  /// The default value is empty.
84  const std::string & secretKey() const ONIXS_ILINK3_NOTHROW {
85  return secretKey_;
86  }
87 
88  /// Sets the secret key that was assigned by the exchange.
90  SessionSettings& secretKey(const std::string & value);
91 
92  /// \return the trading system name.
93  ///
94  /// The default value is empty.
96  const std::string & tradingSystemName() const ONIXS_ILINK3_NOTHROW {
97  return tradingSystemName_;
98  }
99 
100  /// Sets the trading system name.
102  SessionSettings& tradingSystemName(const std::string & value);
103 
104  /// \return the trading system version.
105  ///
106  /// The default value is empty.
108  const std::string & tradingSystemVersion() const ONIXS_ILINK3_NOTHROW {
109  return tradingSystemVersion_;
110  }
111 
112  /// Sets the trading system version.
114  SessionSettings& tradingSystemVersion(const std::string & value);
115 
116  /// \return the trading system vendor.
117  ///
118  /// The default value is empty.
120  const std::string & tradingSystemVendor() const ONIXS_ILINK3_NOTHROW {
121  return tradingSystemVendor_;
122  }
123 
124  /// Sets the trading system vendor.
126  SessionSettings& tradingSystemVendor(const std::string & value);
127 
128  /// \return the threading model.
129  ///
130  /// The default value is Default::ThreadingModelValue.
133  return threadingModel_;
134  }
135 
136  /// Sets the threading model.
138  SessionSettings& threadingModel(ThreadingModel::Enum value);
139 
140  /// \return the receive spinning timeout (microseconds).
141  ///
142  /// The default value is Default::ReceiveSpinningTimeout.
145  return receiveSpinningTimeout_;
146  }
147 
148  /// Sets the receive spinning timeout (microseconds).
150  SessionSettings& receiveSpinningTimeout(unsigned usecTimeout);
151 
152  /// \return the send spinning timeout (microseconds).
153  ///
154  /// The default value is Default::SendSpinningTimeout.
157  return sendSpinningTimeout_;
158  }
159 
160  /// Sets the send spinning timeout (microseconds).
162  SessionSettings& sendSpinningTimeout(unsigned usecTimeout);
163 
164  /// \return the message grouping mode.
165  ///
166  /// - `0` means default grouping - the messages are sent immediately, and pending messages (if any) are grouped till reaching of the TCP buffer size.
167  /// - `1` means the messages are sent immediately and never grouped.
168  /// - `2` (or higher) means the messages are sent immediately, and pending messages are grouped by 2 (or higher).
169  ///
170  /// The default value is Default::MessageGrouping.
173  return messageGrouping_;
174  }
175 
176  /// Sets the message grouping mode.
178  SessionSettings& messageGrouping(unsigned value);
179 
180  /// Resets the settings to the default values.
181  SessionSettings& resetToDefaults();
182 
183  /// Adds the path to the folder that contains license file(s).
185  SessionSettings& addLicenseStore(const std::string& value);
186 
187  /// Sets the path to the folder that contains license file(s).
189  SessionSettings& licenseStore(const std::string & value);
190 
191  /// Folders that contain license file(s).
192  typedef std::vector<std::string> LicenseStores;
193 
194  /// \return path(s) to the folder that contains license file(s).
195  ///
196  /// The default value is '.'.
198  const LicenseStores& licenseStores() const ONIXS_ILINK3_NOTHROW {
199  return licenseStores_;
200  }
201 
202  /// \return the number of days to alert before the license expiration.
203  ///
204  /// The default value is Default::LicenseAlertingDaysBeforeExpiration.
207  return licenseAlertingDaysBeforeExpiration_;
208  }
209 
210  /// Sets the number of days to alert before the license expiration.
211  ///
212  /// If the amount of remaining license days is less or equal to this number,
213  /// then the warning is reported to the Handler's log.
214  ///
215  /// The verification is performed during the Session::connect call.
217  SessionSettings& licenseAlertingDaysBeforeExpiration(unsigned days) {
218  licenseAlertingDaysBeforeExpiration_ = days;
219  return *this;
220  }
221 
222  /// \return The interface name or IP-address from which the Handler connects to the counterparty.
223  ///
224  /// The default value is empty.
226  const std::string & localNetworkInterface() const ONIXS_ILINK3_NOTHROW {
227  return localNetworkInterface_;
228  }
229 
230  /// Specifies the local interface from which the Handler connects to the counterparty.
231  ///
232  /// Each local interface specification could specify the local IP address and port.
233  /// For instance, `localhost` and `192.168.0.1:4501` are valid values.
235  SessionSettings& localNetworkInterface(const std::string & value);
236 
237  /// \return the Handler log file name.
238  ///
239  /// The default value is `HandlerLog.txt`.
241  const std::string & logFileName() const ONIXS_ILINK3_NOTHROW {
242  return logFileName_;
243  }
244 
245  /// Specifies the Handler log file name.
247  SessionSettings& logFileName(const std::string & value);
248 
249  /// \return the Session Storage directory.
250  ///
251  /// Inbound and outbound messages, session's state data and the Handler log file are stored in this directory.
252  ///
253  /// The default value is `MsgStorage`.
255  const std::string & storageDirectory() const ONIXS_ILINK3_NOTHROW {
256  return storageDirectory_;
257  }
258 
259  /// Sets the Session Storage directory.
260  ///
261  /// Inbound and outbound messages, session's state data and the Handler log file are stored in this directory.
263  SessionSettings& storageDirectory(const std::string & value);
264 
265  /// \return the usage of the local time in Handler events and log files.
266  ///
267  /// The default value is Default::LocalTimeUsage.
270  return localTimeUsage_;
271  }
272 
273  /// Specifies the usage of the local time in Handler events and log files.
274  ///
275  /// If it is `true`, then the local time is used; otherwise - UTC.
277  SessionSettings& localTimeUsage(bool);
278 
279  /// \return the segment size for the file-based session storage.
280  ///
281  /// The default value is Default::FileBasedStorageSegmentSize.
284  return fileBasedStorageSegmentSize_;
285  }
286 
287  /// Sets the segment size for file-based session storage.
289  SessionSettings& fileBasedStorageSegmentSize(Messaging::UInt64 value);
290 
291  /// \return the maximum size of the asynchronous session storage queue.
292  ///
293  /// By default, the size is unlimited.
296  return asyncFileBasedStorageQueueMaxSize_;
297  }
298 
299  /// Sets the maximum size of the asynchronous session storage queue.
301  SessionSettings& asyncFileBasedStorageQueueMaxSize(unsigned value);
302 
303  /// \return the CPU index(es) for affinity of the asynchronous session storage threads.
304  ///
305  /// By default, the affinity is not set.
308  return asyncFileBasedStorageThreadAffinity_;
309  }
310 
311  /// Specifies the CPU index(es) for affinity of the asynchronous session storage threads.
313  SessionSettings& asyncFileBasedStorageThreadAffinity(const CpuIndexes & cpuIndexes);
314 
315  /// \return The file-based storage integrity errors checking mode:
316  ///
317  /// - `true` - ignore errors and create a new storage
318  /// - `false` - throw an exception
319  ///
320  /// The default value is Default::IgnoreFileBasedStorageIntegrityErrors.
323  return ignoreFileBasedStorageIntegrityErrors_;
324  }
325 
326  /// Sets the file-based storage integrity errors checking mode.
328  SessionSettings& ignoreFileBasedStorageIntegrityErrors(bool);
329 
330  /// \return `true` if outbound messages are logged before sending, 'false' otherwise.
331  ///
332  /// The default value is Default::LogBeforeSending.
335  return logBeforeSending_;
336  }
337 
338  /// Controls the order of logging and sending outbound messages.
339  ///
340  /// \param before if 'true' then outbound messages are logged before sending.
342  SessionSettings& logBeforeSending(bool before);
343 
344  /// \return the maximum number of tries to restore the telecommunications link.
345  ///
346  /// The default value is Default::ReconnectAttempts.
349  return reconnectAttempts_;
350  }
351 
352  /// Sets the maximum number of tries to restore the telecommunications link.
354  SessionSettings& reconnectAttempts(unsigned reconnectAttempts);
355 
356  /// \return the time interval between retries to restore the telecommunications link (seconds).
357  ///
358  /// The default value is Default::ReconnectInterval.
361  return reconnectInterval_;
362  }
363 
364  /// Sets the time interval between retries to restore the telecommunications link (seconds).
365  /// Should not be zero.
367  SessionSettings& reconnectInterval(unsigned value);
368 
369  /// Specifies the usage of the operating system default socket buffer size.
370  static const int UseOsDefaultSocketBufferSize = -1;
371 
372  /// \return the socket receive buffer size.
373  ///
374  /// The default value is Default::SocketReceiveBufferSize.
377  return socketReceiveBufferSize_;
378  }
379 
380  /// Sets the socket receive buffer size.
381  ///
382  /// \param bufferSize the size of the socket receive buffer size.
383  /// If SessionSettings::UseOsDefaultSocketBufferSize then the default operating system value is used.
385  SessionSettings& socketReceiveBufferSize(int bufferSize);
386 
387  /// \return the reasonable transmission time - as the percentage from the `KeepAliveInterval` value.
388  ///
389  /// The default value is Default::ReasonableTransmissionTime.
392  return reasonableTransmissionTime_;
393  }
394 
395  /// Sets the reasonable transmission time - as the percentage from the `KeepAliveInterval` value.
397  SessionSettings& reasonableTransmissionTime(unsigned percentage);
398 
399  /// \return the size of the socket send buffer size.
400  ///
401  /// The default value is Default::SocketSendBufferSize.
404  return socketSendBufferSize_;
405  }
406 
407  /// Sets the size of the socket send buffer size.
408  ///
409  /// \param bufferSize the size of the socket send buffer size.
410  /// If SessionSettings::UseOsDefaultSocketBufferSize then the default operating system value is used.
412  SessionSettings& socketSendBufferSize(int bufferSize);
413 
414  /// \return the thread pool affinity.
417  return threadPoolAffinity_;
418  }
419 
420  /// Sets the thread pool affinity.
422  SessionSettings& threadPoolAffinity(const CpuIndexes & cpuIndexes);
423 
424  /// \return the thread pool priority.
427  return threadPoolPriority_;
428  }
429 
430  /// Sets the thread pool priority.
432  SessionSettings& threadPoolPriority(int priority);
433 
434  /// \return the thread pool policy.
437  return threadPoolPolicy_;
438  }
439 
440  /// Sets the thread pool policy.
442  SessionSettings& threadPoolPolicy(int policy);
443 
444  /// \return the value of the option to improve latency at the expense of message throughput (the `TCP_NODELAY` socket option).
445  ///
446  /// The default value is Default::TcpNoDelayOption.
449  return tcpNoDelayOption_;
450  }
451 
452  /// Sets the value of the option to improve latency at the expense of message throughput (the `TCP_NODELAY` socket option).
454  SessionSettings& tcpNoDelayOption(bool value);
455 
456  /// \return the size of the shared thread pool.
457  ///
458  /// The default value is Default::ThreadPoolSize.
461  return threadPoolSize_;
462  }
463 
464  /// Sets the size of the shared thread pool.
466  SessionSettings& threadPoolSize(unsigned numberOfThreads);
467 
468  /// \return the longest time in milliseconds the client system can remain silent before sending a message.
469  ///
470  /// The default value is Default::KeepAliveInterval.
473  return keepAliveInterval_;
474  }
475 
476  /// Sets the longest time in milliseconds the client system can remain silent before sending
477  /// a message.
478  ///
479  /// \note Allowed range is between `5000` - `60000`. Any value outside this range will be rejected.
481  SessionSettings& keepAliveInterval(unsigned milliseconds);
482 
483  /// \return `true` if new messages are reported even when the message gap is detected,
484  /// and the reply on the [Retransmit Request](https://www.cmegroup.com/confluence/display/EPICSANDBOX/Retransmit+Request)
485  /// message is expected; otherwise - `false`.
486  ///
487  /// The default value is Default::ReportNewMessagesWhileWaitingForMissedMessages.
490  return reportNewMessagesWhileWaitingForMissedMessages_;
491  }
492 
493  /// Sets the option to report new messages even when the message gap is detected,
494  /// and the reply on the [Retransmit Request](https://www.cmegroup.com/confluence/display/EPICSANDBOX/Retransmit+Request)
495  /// message is expected.
497  SessionSettings& reportNewMessagesWhileWaitingForMissedMessages(bool report);
498 
499  /// Sets the range of the local ports to be used
501  SessionSettings& localPortRange(PortRange range);
502 
503  /// \return the range of the local ports to be used
506  return localPortRange_;
507  }
508 
509  /// Specifies the version of the message schema.
510  /// Allowed range is between Messaging::SchemaTraits::MinimalVersion - Messaging::SchemaTraits::Version.
511  /// The default value is Messaging::SchemaTraits::Version.
513  SessionSettings& messagingSchemaVersion(Messaging::SchemaVersion schema);
514 
515  /// \return the version of the message schema.
518  return messagingSchemaVersion_;
519  }
520 
521  /// \return the value of the option to detect the message gap for the previous UUID.
522  ///
523  /// The default value is `true`.
526  return detectMessageGapForPreviousUuid_;
527  }
528 
529  /// Sets the value of the option to detect the message gap for the previous UUID.
531  SessionSettings& detectMessageGapForPreviousUuid(bool detectGap);
532 
533  /// \return the value of the option to use spin lock.
534  ///
535  /// The default value is `false`.
538  return useSpinLock_;
539  }
540 
541  /// Sets the value of the option to the option to use spin lock.
543  SessionSettings& useSpinLock(bool value);
544 
545  /// \return the value of the option to enable received data timestamp.
546  ///
547  /// The default value is `false`.
550  return enableRxTimestamp_;
551  }
552 
553  /// Sets the value of the option to enable received data timestamp.
554  /// \note available on Linux only
556  SessionSettings& enableRxTimestamp(bool value);
557 
558  /// Loads the settings from the given configuration file.
559  ///
560  /// \see Key
562  SessionSettings& load(const std::string& configFile);
563 
564  /// \return the human-friendly description.
566  std::string toString() const;
567 
568  /// Default session settings.
570  static const ThreadingModel::Enum ThreadingModelValue = ThreadingModel::Dedicated;
571  static const bool CreateLogFile = true;
572  static const int KeepAliveInterval = 30000;
573  static const bool LogBeforeSending = true;
574  static const int SocketSendBufferSize = UseOsDefaultSocketBufferSize;
575  static const int SocketReceiveBufferSize = UseOsDefaultSocketBufferSize;
576  static const bool TcpNoDelayOption = true;
577  static const int ReceiveSpinningTimeout = 0;
578  static const int SendSpinningTimeout = 0;
579  static const char LicenseStore[] ;
580  static const unsigned LicenseAlertingDaysBeforeExpiration = 0;
581  static const char LogDir[];
582  static const char LogFileName[];
583  static const bool LocalTimeUsage = false;
584  static const unsigned MessageGrouping = 0;
585  static const int ReasonableTransmissionTime = 20;
586  static const int ReconnectAttempts = 3;
587  static const int ReconnectInterval = 180;
588  static const unsigned long long FileBasedStorageSegmentSize = 0;
589  static const bool IgnoreFileBasedStorageIntegrityErrors = false;
590  static const int ThreadPoolSize = 0;
591  static const bool ReportNewMessagesWhileWaitingForMissedMessages = false;
592  static const unsigned AsyncFileBasedStorageQueueMaxSize = UINT_MAX;
593  static const bool DetectMessageGapForPreviousUuid = true;
594  static const bool UseSpinLock = false;
595  static const bool EnableRxTimestamp = false;
596  };
597 
598  /// The keys that are used to load settings from the configuration file.
600  static const char * SessionId; ///< = "SessionId"
601  static const char * FirmId; ///< = "FirmId"
602  static const char * AccessKey; ///< = "AccessKey"
603  static const char * SecretKey; ///< = "SecretKey"
604  static const char * TradingSystemName; ///< = "TradingSystem.Name"
605  static const char * TradingSystemVersion; ///< = "TradingSystem.Version"
606  static const char * TradingSystemVendor; ///< = "TradingSystem.Vendor"
607 
608  static const char * AsyncFileBasedStorageQueueMaxSize; ///< = "AsyncFileBasedStorage.QueueMaxSize"
609  static const char * AsyncFileBasedStorageThreadAffinity; ///< = "AsyncFileBasedStorage.ThreadAffinity"
610  static const char * ThreadingModel; ///< = "ThreadingModel"
611  static const char * TcpNoDelayOption; ///< = "TcpNoDelayOption"
612  static const char * MessageGrouping; ///< = "MessageGrouping"
613  static const char * FileBasedStorageSegmentSize; ///< = "FileBasedStorageSegmentSize"
614  static const char * IgnoreFileBasedStorageIntegrityErrors; ///< = "IgnoreFileBasedStorageIntegrityErrors"
615  static const char * KeepAliveInterval; ///< = "KeepAliveInterval"
616  static const char * LicenseFile; ///< = "LicenseFile"
617  static const char * LicenseStore; ///< = "LicenseStore"
618  static const char * LicenseAlertingDaysBeforeExpiration; ///< = "LicenseAlertingDaysBeforeExpiration"
619  static const char * LocalNetworkInterface; ///< = "LocalNetworkInterface"
620  static const char * LogFileName; ///< = "Log.FileName"
621  static const char * LocalTimeUsage; ///< = "LocalTimeUsage"
622  static const char * LogBeforeSending; ///< = "Log.BeforeSending"
623  static const char * ReasonableTransmissionTime; ///< = "ReasonableTransmissionTime"
624  static const char * ReceiveSpinningTimeout; ///< = "ReceiveSpinningTimeout"
625  static const char * ReconnectAttempts; ///< = "Reconnect.Attempts"
626  static const char * ReconnectInterval; ///< = "Reconnect.Interval"
627  static const char * SendSpinningTimeout; ///< = "SendSpinningTimeout"
628  static const char * ThreadPoolAffinity; ///< = "ThreadPool.Affinity"
629  static const char * ThreadPoolSize; ///< = "ThreadPool.Size"
630  static const char * ThreadPoolPriority; ///< = "ThreadPool.Priority"
631  static const char * ThreadPoolPolicy; ///< = "ThreadPool.Policy"
632  static const char * SocketReceiveBufferSize; ///< = "Socket.ReceiveBufferSize"
633  static const char * SocketSendBufferSize; ///< = "Socket.SendBufferSize"
634  static const char * StorageDirectory; ///< = "Log.Directory"
635  static const char * ReportNewMessagesWhileWaitingForMissedMessages; ///< = "ReportNewMessagesWhileWaitingForMissedMessages"
636  static const char * MessagingSchemaVersion; ///< = "MessagingSchemaVersion"
637  static const char * LocalPortRange; ///< = "LocalPortRange"
638  static const char * DetectMessageGapForPreviousUuid; ///< = "DetectMessageGapForPreviousUuid"
639  static const char * UseSpinLock; ///< = "UseSpinLock"
640  static const char * EnableRxTimestamp; ///< = "EnableRxTimestamp"
641  };
642 
643 private:
644  void processLicenseStores(const std::string& licenseStore);
645 
646  std::string accessKey_;
647 
648  unsigned asyncFileBasedStorageQueueMaxSize_;
649 
650  CpuIndexes asyncFileBasedStorageThreadAffinity_;
651 
652  bool createEngineLogFile_;
653 
654  Messaging::UInt64 fileBasedStorageSegmentSize_;
655 
656  std::string firmId_;
657 
658  bool ignoreFileBasedStorageIntegrityErrors_;
659 
660  unsigned keepAliveInterval_;
661 
662  unsigned licenseAlertingDaysBeforeExpiration_;
663 
664  std::string licenseFilePath_;
665 
666  LicenseStores licenseStores_;
667 
668  std::string localNetworkInterface_;
669 
670  bool localTimeUsage_;
671 
672  bool logBeforeSending_;
673 
674  std::string logFileName_;
675 
676  unsigned messageGrouping_;
677 
678  unsigned reasonableTransmissionTime_;
679 
680  int receiveSpinningTimeout_;
681 
682  unsigned reconnectAttempts_;
683 
684  unsigned reconnectInterval_;
685 
686  bool reportNewMessagesWhileWaitingForMissedMessages_;
687 
688  std::string secretKey_;
689 
690  int sendSpinningTimeout_;
691 
692  std::string sessionId_;
693 
694  int socketReceiveBufferSize_;
695 
696  int socketSendBufferSize_;
697 
698  std::string storageDirectory_;
699 
700  bool tcpNoDelayOption_;
701 
702  ThreadingModel::Enum threadingModel_;
703 
704  CpuIndexes threadPoolAffinity_;
705 
706  int threadPoolPolicy_;
707 
708  int threadPoolPriority_;
709 
710  unsigned threadPoolSize_;
711 
712  std::string tradingSystemName_;
713 
714  std::string tradingSystemVendor_;
715 
716  std::string tradingSystemVersion_;
717 
718  std::pair<Port, Port> localPortRange_;
719 
720  Messaging::SchemaVersion messagingSchemaVersion_;
721 
722  bool detectMessageGapForPreviousUuid_;
723 
724  bool useSpinLock_;
725 
726  bool enableRxTimestamp_;
727 };
728 
729 }
730 }
731 }
const std::string & secretKey() const noexcept
static const char * ReceiveSpinningTimeout
= "ReceiveSpinningTimeout"
static const char * LogFileName
= "Log.FileName"
unsigned sendSpinningTimeout() const noexcept
static const char * MessagingSchemaVersion
= "MessagingSchemaVersion"
unsigned messageGrouping() const noexcept
unsigned keepAliveInterval() const noexcept
unsigned asyncFileBasedStorageQueueMaxSize() const noexcept
static const char * LocalTimeUsage
= "LocalTimeUsage"
const std::string & tradingSystemVersion() const noexcept
static const char * LocalPortRange
= "LocalPortRange"
bool tcpNoDelayOption() const noexcept
int threadPoolPriority() const noexcept
bool ignoreFileBasedStorageIntegrityErrors() const noexcept
static const char * ReportNewMessagesWhileWaitingForMissedMessages
= "ReportNewMessagesWhileWaitingForMissedMessages"
static const char * ThreadPoolPolicy
= "ThreadPool.Policy"
std::vector< std::string > LicenseStores
Folders that contain license file(s).
bool enableRxTimestamp() const noexcept
static const char * LocalNetworkInterface
= "LocalNetworkInterface"
unsigned receiveSpinningTimeout() const noexcept
static const char * AccessKey
= "AccessKey"
static const char * ReconnectInterval
= "Reconnect.Interval"
static const char * FirmId
= "FirmId"
ThreadingModel::Enum threadingModel() const noexcept
static const char * LicenseFile
= "LicenseFile"
static const char * FileBasedStorageSegmentSize
= "FileBasedStorageSegmentSize"
static const char * KeepAliveInterval
= "KeepAliveInterval"
MessageHeader::Version SchemaVersion
SBE-encoded data version type.
Definition: SchemaTraits.h:30
static const char * SocketReceiveBufferSize
= "Socket.ReceiveBufferSize"
bool logBeforeSending() const noexcept
static const char * StorageDirectory
= "Log.Directory"
static const char * LicenseAlertingDaysBeforeExpiration
= "LicenseAlertingDaysBeforeExpiration"
const std::string & sessionId() const noexcept
SessionSettings & licenseStore(const std::string &value)
Sets the path to the folder that contains license file(s).
static const char * ThreadPoolAffinity
= "ThreadPool.Affinity"
const CpuIndexes & asyncFileBasedStorageThreadAffinity() const noexcept
static const char * ThreadingModel
= "ThreadingModel"
static const char * SecretKey
= "SecretKey"
std::set< CpuIndex > CpuIndexes
Definition: Defines.h:73
Messaging::UInt64 fileBasedStorageSegmentSize() const noexcept
std::pair< Port, Port > PortRange
Definition: Defines.h:74
PortRange localPortRange() const noexcept
Definition: Defines.h:40
const std::string & localNetworkInterface() const noexcept
const CpuIndexes & threadPoolAffinity() const noexcept
The keys that are used to load settings from the configuration file.
int socketSendBufferSize() const noexcept
bool localTimeUsage() const noexcept
SessionSettings & licenseAlertingDaysBeforeExpiration(unsigned days)
Sets the number of days to alert before the license expiration.
const std::string & accessKey() const noexcept
static const char * TradingSystemVendor
= "TradingSystem.Vendor"
static const char * LogBeforeSending
= "Log.BeforeSending"
bool reportNewMessagesWhileWaitingForMissedMessages() const noexcept
Each session has a sender thread and a receiving thread.
unsigned licenseAlertingDaysBeforeExpiration() const noexcept
static const char * SocketSendBufferSize
= "Socket.SendBufferSize"
const std::string & tradingSystemName() const noexcept
static const char * SendSpinningTimeout
= "SendSpinningTimeout"
static const char * IgnoreFileBasedStorageIntegrityErrors
= "IgnoreFileBasedStorageIntegrityErrors"
const LicenseStores & licenseStores() const noexcept
unsigned reconnectInterval() const noexcept
const std::string & storageDirectory() const noexcept
Messaging::SchemaVersion messagingSchemaVersion() const noexcept
static const char * ThreadPoolPriority
= "ThreadPool.Priority"
#define ONIXS_ILINK3_EXPORTED
Definition: Compiler.h:175
bool detectMessageGapForPreviousUuid() const noexcept
static const char * MessageGrouping
= "MessageGrouping"
static const char * AsyncFileBasedStorageThreadAffinity
= "AsyncFileBasedStorage.ThreadAffinity"
static const int UseOsDefaultSocketBufferSize
Specifies the usage of the operating system default socket buffer size.
static const char * TcpNoDelayOption
= "TcpNoDelayOption"
static const char * ThreadPoolSize
= "ThreadPool.Size"
UInt64 UInt64
uInt64.
Definition: Fields.h:308
static const char * TradingSystemVersion
= "TradingSystem.Version"
static const char * SessionId
= "SessionId"
SessionSettings & load(const std::string &configFile)
Loads the settings from the given configuration file.
const std::string & tradingSystemVendor() const noexcept
SessionSettings & addLicenseStore(const std::string &value)
Adds the path to the folder that contains license file(s).
unsigned threadPoolSize() const noexcept
static const char * ReconnectAttempts
= "Reconnect.Attempts"
static const char * UseSpinLock
= "UseSpinLock"
static const char * EnableRxTimestamp
= "EnableRxTimestamp"
const std::string & firmId() const noexcept
unsigned reconnectAttempts() const noexcept
static const char * DetectMessageGapForPreviousUuid
= "DetectMessageGapForPreviousUuid"
#define ONIXS_ILINK3_NODISCARD
Definition: Compiler.h:185
static const char * TradingSystemName
= "TradingSystem.Name"
unsigned reasonableTransmissionTime() const noexcept
int socketReceiveBufferSize() const noexcept
#define ONIXS_ILINK3_NOTHROW
Definition: Compiler.h:176
static const char * LicenseStore
= "LicenseStore"
SessionSettings & resetToDefaults()
Resets the settings to the default values.
static const char * AsyncFileBasedStorageQueueMaxSize
= "AsyncFileBasedStorage.QueueMaxSize"
const std::string & logFileName() const noexcept
static const char * ReasonableTransmissionTime
= "ReasonableTransmissionTime"