OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.15.1
API documentation
FeedEngineSettings.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Onix Solutions Limited. All rights reserved.
3  *
4  * This software owned by Onix Solutions Limited 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 "Export.h"
23 #include "ThreadAffinity.h"
24 
25 #include <iosfwd>
26 #include <string>
27 
28 namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
29 
30 /// Collection of settings affecting Feed Engine behavior.
31 class ONIXS_ICEMDH_EXPORT FeedEngineSettings
32 {
33 public:
34  /// Initializes options with default values.
36 
37  /// Defines set of CPUs allowed for each working thread
38  /// to be executed on while processing market data by Handlers
39  /// binded to Feed Engine instance which is configured by given
40  /// settings.
41  ///
42  /// \note By default set is empty thus allowing threads
43  /// to be executed on any CPU available in the system.
45 
46  /// Number of working threads to be used by feed engine.
47  ///
48  /// \note Default value is '1'.
49  unsigned int threadCount;
50 
51  /// Defines amount of time Feed Engine spends on socket
52  /// waiting for I/O while running master processing loop.
53  ///
54  /// Time is measured in milliseconds.
55  ///
56  /// \note Default value is '10'.
57  ///
58  /// \warning Given parameter significantly affects the
59  /// Handler's responsiveness and load onto CPU!
60  unsigned int dataWaitTime;
61 
62  /// Defines amount of time Feed Engine keeps cycling before
63  /// going to sleep when no useful activity can be done.
64  ///
65  /// Time is measured in milliseconds.
66  ///
67  /// \note Default value is '1'.
68  ///
69  /// \warning Given parameter has direct influence onto CPU load!
70  unsigned int spinBeforeIdleTime;
71 
72  /// Defines size of receiving buffer in bytes for sockets.
73  ///
74  /// \note Default value is 8 MiB.
75  unsigned int socketBufferSize;
76 
77  /// Returns the string representation.
78  std::string toString() const;
79 };
80 
81 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const FeedEngineSettings&);
82 
83 }}}}
Collection of settings affecting Feed Engine behavior.
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.