OnixS C++ CME iLink 3 Binary Order Entry Handler  1.17.0
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 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  /// Loads the settings from the given configuration file.
546  ///
547  /// \see Key
549  SessionSettings& load(const std::string& configFile);
550 
551  /// \return the human-friendly description.
553  std::string toString() const;
554 
555  /// Default session settings.
557  static const ThreadingModel::Enum ThreadingModelValue = ThreadingModel::Dedicated;
558  static const bool CreateLogFile = true;
559  static const int KeepAliveInterval = 30000;
560  static const bool LogBeforeSending = true;
561  static const int SocketSendBufferSize = UseOsDefaultSocketBufferSize;
562  static const int SocketReceiveBufferSize = UseOsDefaultSocketBufferSize;
563  static const bool TcpNoDelayOption = true;
564  static const int ReceiveSpinningTimeout = 0;
565  static const int SendSpinningTimeout = 0;
566  static const char LicenseStore[] ;
567  static const unsigned LicenseAlertingDaysBeforeExpiration = 0;
568  static const char LogDir[];
569  static const char LogFileName[];
570  static const bool LocalTimeUsage = false;
571  static const unsigned MessageGrouping = 0;
572  static const int ReasonableTransmissionTime = 20;
573  static const int ReconnectAttempts = 3;
574  static const int ReconnectInterval = 180;
575  static const unsigned long long FileBasedStorageSegmentSize = 0;
576  static const bool IgnoreFileBasedStorageIntegrityErrors = false;
577  static const int ThreadPoolSize = 0;
578  static const bool ReportNewMessagesWhileWaitingForMissedMessages = false;
579  static const unsigned AsyncFileBasedStorageQueueMaxSize = UINT_MAX;
580  static const bool DetectMessageGapForPreviousUuid = true;
581  static const bool UseSpinLock = false;
582  };
583 
584  /// The keys that are used to load settings from the configuration file.
586  static const char * SessionId; ///< = "SessionId"
587  static const char * FirmId; ///< = "FirmId"
588  static const char * AccessKey; ///< = "AccessKey"
589  static const char * SecretKey; ///< = "SecretKey"
590  static const char * TradingSystemName; ///< = "TradingSystem.Name"
591  static const char * TradingSystemVersion; ///< = "TradingSystem.Version"
592  static const char * TradingSystemVendor; ///< = "TradingSystem.Vendor"
593 
594  static const char * AsyncFileBasedStorageQueueMaxSize; ///< = "AsyncFileBasedStorage.QueueMaxSize"
595  static const char * AsyncFileBasedStorageThreadAffinity; ///< = "AsyncFileBasedStorage.ThreadAffinity"
596  static const char * ThreadingModel; ///< = "ThreadingModel"
597  static const char * TcpNoDelayOption; ///< = "TcpNoDelayOption"
598  static const char * MessageGrouping; ///< = "MessageGrouping"
599  static const char * FileBasedStorageSegmentSize; ///< = "FileBasedStorageSegmentSize"
600  static const char * IgnoreFileBasedStorageIntegrityErrors; ///< = "IgnoreFileBasedStorageIntegrityErrors"
601  static const char * KeepAliveInterval; ///< = "KeepAliveInterval"
602  static const char * LicenseFile; ///< = "LicenseFile"
603  static const char * LicenseStore; ///< = "LicenseStore"
604  static const char * LicenseAlertingDaysBeforeExpiration; ///< = "LicenseAlertingDaysBeforeExpiration"
605  static const char * LocalNetworkInterface; ///< = "LocalNetworkInterface"
606  static const char * LogFileName; ///< = "Log.FileName"
607  static const char * LocalTimeUsage; ///< = "LocalTimeUsage"
608  static const char * LogBeforeSending; ///< = "Log.BeforeSending"
609  static const char * ReasonableTransmissionTime; ///< = "ReasonableTransmissionTime"
610  static const char * ReceiveSpinningTimeout; ///< = "ReceiveSpinningTimeout"
611  static const char * ReconnectAttempts; ///< = "Reconnect.Attempts"
612  static const char * ReconnectInterval; ///< = "Reconnect.Interval"
613  static const char * SendSpinningTimeout; ///< = "SendSpinningTimeout"
614  static const char * ThreadPoolAffinity; ///< = "ThreadPool.Affinity"
615  static const char * ThreadPoolSize; ///< = "ThreadPool.Size"
616  static const char * ThreadPoolPriority; ///< = "ThreadPool.Priority"
617  static const char * ThreadPoolPolicy; ///< = "ThreadPool.Policy"
618  static const char * SocketReceiveBufferSize; ///< = "Socket.ReceiveBufferSize"
619  static const char * SocketSendBufferSize; ///< = "Socket.SendBufferSize"
620  static const char * StorageDirectory; ///< = "Log.Directory"
621  static const char * ReportNewMessagesWhileWaitingForMissedMessages; ///< = "ReportNewMessagesWhileWaitingForMissedMessages"
622  static const char * MessagingSchemaVersion; ///< = "MessagingSchemaVersion"
623  static const char * LocalPortRange; ///< = "LocalPortRange"
624  static const char * DetectMessageGapForPreviousUuid; ///< = "DetectMessageGapForPreviousUuid"
625  static const char * UseSpinLock; ///< = "UseSpinLock"
626  };
627 
628 private:
629  void processLicenseStores(const std::string& licenseStore);
630 
631  std::string accessKey_;
632 
633  unsigned asyncFileBasedStorageQueueMaxSize_;
634 
635  CpuIndexes asyncFileBasedStorageThreadAffinity_;
636 
637  bool createEngineLogFile_;
638 
639  Messaging::UInt64 fileBasedStorageSegmentSize_;
640 
641  std::string firmId_;
642 
643  bool ignoreFileBasedStorageIntegrityErrors_;
644 
645  unsigned keepAliveInterval_;
646 
647  unsigned licenseAlertingDaysBeforeExpiration_;
648 
649  std::string licenseFilePath_;
650 
651  LicenseStores licenseStores_;
652 
653  std::string localNetworkInterface_;
654 
655  bool localTimeUsage_;
656 
657  bool logBeforeSending_;
658 
659  std::string logFileName_;
660 
661  unsigned messageGrouping_;
662 
663  unsigned reasonableTransmissionTime_;
664 
665  int receiveSpinningTimeout_;
666 
667  unsigned reconnectAttempts_;
668 
669  unsigned reconnectInterval_;
670 
671  bool reportNewMessagesWhileWaitingForMissedMessages_;
672 
673  std::string secretKey_;
674 
675  int sendSpinningTimeout_;
676 
677  std::string sessionId_;
678 
679  int socketReceiveBufferSize_;
680 
681  int socketSendBufferSize_;
682 
683  std::string storageDirectory_;
684 
685  bool tcpNoDelayOption_;
686 
687  ThreadingModel::Enum threadingModel_;
688 
689  CpuIndexes threadPoolAffinity_;
690 
691  int threadPoolPolicy_;
692 
693  int threadPoolPriority_;
694 
695  unsigned threadPoolSize_;
696 
697  std::string tradingSystemName_;
698 
699  std::string tradingSystemVendor_;
700 
701  std::string tradingSystemVersion_;
702 
703  std::pair<Port, Port> localPortRange_;
704 
705  Messaging::SchemaVersion messagingSchemaVersion_;
706 
707  bool detectMessageGapForPreviousUuid_;
708 
709  bool useSpinLock_;
710 };
711 
712 }
713 }
714 }
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).
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:167
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"
const std::string & firmId() const noexcept
unsigned reconnectAttempts() const noexcept
static const char * DetectMessageGapForPreviousUuid
= "DetectMessageGapForPreviousUuid"
#define ONIXS_ILINK3_NODISCARD
Definition: Compiler.h:177
static const char * TradingSystemName
= "TradingSystem.Name"
unsigned reasonableTransmissionTime() const noexcept
int socketReceiveBufferSize() const noexcept
#define ONIXS_ILINK3_NOTHROW
Definition: Compiler.h:168
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"