66 , hosts_(other.hosts_)
84 group_.controlAssignment(
"Port", port_,
port);
94 const std::string&
ip()
const
106 group_.controlAssignment(
"IP Address", ip_, address);
190 const std::string&
id()
const
198 group_.controlAssignment(
"Identifier", id_,
id);
206 group_.controlChange(
"Feed Connection Settings", &FeedConnectionSettings::assignNoControl, *
this, other);
244 toStr(str, settings);
250template <
typename Layout>
263 group_.controlAssignment(
"Layout", layout_, value);
276 return heartbeatInterval_;
282 group_.controlAssignment(
"Heartbeat Interval", heartbeatInterval_, interval);
311#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
324 A_.networkInterfaces(interfaces);
340 B_.networkInterfaces(interfaces);
355 , heartbeatInterval_(heartbeat)
369 , layout_(other.layout_)
370 , heartbeatInterval_(other.heartbeatInterval_)
391 layout_ = other.layout_;
393 heartbeatInterval_ = other.heartbeatInterval_;
395 A_.assignNoControl(other.A_);
396 B_.assignNoControl(other.B_);
403 UInt32 heartbeatInterval_;
476 :
Base(static_cast<const
Base&>(other))
486 group().controlChange(
487 "Multicast Recovery Feed Settings", &MulticastRecoveryFeedSettings::assignNoControl, *
this, other
500 Base::assignNoControl(other);
513 toStr(str, settings);
529 , connectionAttempts_(3)
530 , connectionTimeout_(500)
538 :
Base(static_cast<const
Base&>(other))
539 , connectionAttempts_(other.connectionAttempts_)
540 , connectionTimeout_(other.connectionTimeout_)
541 , sendTimeout_(other.sendTimeout_)
555 return connectionAttempts_;
563 group().controlAssignment(
"Connection Attempts", connectionAttempts_, attemptQty);
577 return connectionTimeout_;
616 group().controlChange(
"TCP Recovery Feed Settings", &TcpRecoveryFeedSettings::assignNoControl, *
this, other);
627 UInt32 connectionAttempts_;
628 UInt32 connectionTimeout_;
633 Base::assignNoControl(other);
635 connectionAttempts_ = other.connectionAttempts_;
637 connectionTimeout_ = other.connectionTimeout_;
639 sendTimeout_ = other.sendTimeout_;
652 toStr(str, settings);
719 , outOfOrderPacketMaxInterval_(3)
720 , lostPacketWaitTime_(100000)
727 :
Base(static_cast<const
Base&>(other))
728 , outOfOrderPacketMaxInterval_(other.outOfOrderPacketMaxInterval_)
729 , lostPacketWaitTime_(other.lostPacketWaitTime_)
766 return outOfOrderPacketMaxInterval_;
773 group().controlAssignment(
"Out Of Order Packet Max Interval", outOfOrderPacketMaxInterval_, intervalLength);
801 return lostPacketWaitTime_;
808 group().controlAssignment(
"Lost Packet Wait Time", lostPacketWaitTime_, waitTime);
817 group().controlChange(
"Realtime Feed Settings", &RealtimeFeedSettings::assignNoControl, *
this, other);
827 UInt32 outOfOrderPacketMaxInterval_;
828 UInt32 lostPacketWaitTime_;
832 Base::assignNoControl(other);
834 outOfOrderPacketMaxInterval_ = other.outOfOrderPacketMaxInterval_;
836 lostPacketWaitTime_ = other.lostPacketWaitTime_;
849 toStr(str, settings);
902 , packetMaxSize_(1420)
903 , incrementalFeeds_(&group())
904 , instrumentFeeds_(&group())
905 , snapshotFeeds_(&group())
906 , mboSnapshotFeeds_(&group())
907 , historicalFeeds_(&group())
916 , packetMaxSize_(other.packetMaxSize_)
917 , incrementalFeeds_(other.incrementalFeeds_)
918 , instrumentFeeds_(other.instrumentFeeds_)
919 , snapshotFeeds_(other.snapshotFeeds_)
920 , mboSnapshotFeeds_(other.mboSnapshotFeeds_)
921 , historicalFeeds_(other.historicalFeeds_)
922 , engine_(other.engine_)
939 "Feed A Network Interfaces for All Feeds", &FeedSettings::assignFeedAInterfaces, *
this, interfaces
958 "Feed B Network Interfaces for All Feeds", &FeedSettings::assignFeedBInterfaces, *
this, interfaces
969 return packetMaxSize_;
983 return incrementalFeeds_;
989 return incrementalFeeds_;
995 return instrumentFeeds_;
1001 return instrumentFeeds_;
1007 return snapshotFeeds_;
1013 return snapshotFeeds_;
1019 return mboSnapshotFeeds_;
1025 return mboSnapshotFeeds_;
1031 return historicalFeeds_;
1037 return historicalFeeds_;
1044 return engine_.get();
1059 group().
controlChange(
"Feed Settings", &FeedSettings::assignNoControl, *
this, other);
1077 NetFeedEngineController();
1083 NetFeedEngineController(
const NetFeedEngineController&);
1086 ~NetFeedEngineController();
1089 NetFeedEngineController&
operator=(
const NetFeedEngineController& other)
1091 NetFeedEngineController tmp(other);
1103 void swap(NetFeedEngineController& other)
1105 std::swap(engine_, other.engine_);
1106 std::swap(owned_, other.owned_);
1110 NetFeedEngine* engine_;
1114 PacketSize packetMaxSize_;
1116 RealtimeFeedSettings incrementalFeeds_;
1118 MulticastRecoveryFeedSettings instrumentFeeds_;
1119 MulticastRecoveryFeedSettings snapshotFeeds_;
1120 MulticastRecoveryFeedSettings mboSnapshotFeeds_;
1122 TcpRecoveryFeedSettings historicalFeeds_;
1124 NetFeedEngineController engine_;
1128 const SettingGroup& group()
const
1136 void assignNoControl(
const FeedSettings& other)
1138 packetMaxSize_ = other.packetMaxSize_;
1140 incrementalFeeds_.assignNoControl(other.incrementalFeeds_);
1142 instrumentFeeds_.assignNoControl(other.instrumentFeeds_);
1144 snapshotFeeds_.assignNoControl(other.snapshotFeeds_);
1146 mboSnapshotFeeds_.assignNoControl(other.mboSnapshotFeeds_);
1148 historicalFeeds_.assignNoControl(other.historicalFeeds_);
1150 engine_ = other.engine_;
1155 void assignFeedAInterfaces(
const std::string& interfaces)
1161 incrementalFeeds_.A().networkInterfaces().assignNoControl(nifs);
1163 instrumentFeeds_.A().networkInterfaces().assignNoControl(nifs);
1165 snapshotFeeds_.A().networkInterfaces().assignNoControl(nifs);
1167 mboSnapshotFeeds_.A().networkInterfaces().assignNoControl(nifs);
1169 historicalFeeds_.A().networkInterfaces().assignNoControl(nifs);
1174 void assignFeedBInterfaces(
const std::string& interfaces)
1180 incrementalFeeds_.B().networkInterfaces().assignNoControl(nifs);
1182 instrumentFeeds_.B().networkInterfaces().assignNoControl(nifs);
1184 snapshotFeeds_.B().networkInterfaces().assignNoControl(nifs);
1186 mboSnapshotFeeds_.B().networkInterfaces().assignNoControl(nifs);
1188 historicalFeeds_.B().networkInterfaces().assignNoControl(nifs);
1201 toStr(str, settings);
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_LTWT
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
#define ONIXS_CMEMDH_NAMESPACE_END
#define ONIXS_CMEMDH_NULLPTR
#define ONIXS_CMEMDH_EXPORTED
The collection of parameters defining feed connection.
FeedConnectionSettings & ip(const std::string &address)
Updates address component of the given connection settings.
const std::string & id() const
The unique connection/feed identifier.
friend class FeedSettingsBase
FeedConnectionSettings & operator=(const FeedConnectionSettings &other)
Re-initializes the instance as a copy of the other one.
FeedConnectionSettings(const FeedConnectionSettings &other)
Initializes the given instance as a copy of the other one.
HostListSetting & hosts()
Updates list of hosts for the given connection settings.
~FeedConnectionSettings()
Finalizes the instance.
const std::string & ip() const
Indicates address component of the given connection settings.
const HostListSetting & hosts() const
Indicates host list of the given connection settings.
NifListSetting & networkInterfaces()
List of network interfaces for the given connection settings.
FeedConnectionSettings(const SettingGroup *group=nullptr)
Initializes as a blank instance.
FeedConnectionSettings & networkInterfaces(const std::string &interfaces)
Specifies one or more network interfaces on which to join the multicast group if the settings define ...
const NifListSetting & networkInterfaces() const
List of network interfaces for the given connection settings.
FeedConnectionSettings & hosts(const std::string &hosts)
Updates list of hosts for the given connection settings from a string representing comma or semi-colo...
FeedConnectionSettings & port(UInt32 port)
Updates port number for the given connection settings.
FeedConnectionSettings & id(const std::string &id)
Updates the connection/feed identifier.
UInt32 port() const
Port component of the given connection settings.
Collection of parameters which are common for all types of feeds.
const FeedConnectionSettings & B() const
Connection attributes for the secondary (B) feed.
void assignNoControl(const FeedSettingsBase &other)
Re-initializes the instance as a copy of the other one without involving assignment control services.
Layout layout() const
Defines feed layout for a feed group.
const SettingGroup & group() const
FeedSettingsBase & feedANetworkInterfaces(const std::string &interfaces)
Specifies one or more network interfaces to use for primary (A) feeds while joining the multicast gro...
FeedSettingsBase & feedBNetworkInterfaces(const std::string &interfaces)
Specifies one or more network interfaces to use for secondary (B) feeds while joining the multicast g...
UInt32 heartbeatInterval() const
Specifies maximal time interval between two network packets.
const FeedConnectionSettings & A() const
Connection attributes for the primary (A) feed.
friend class FeedSettings
FeedSettingsBase & heartbeatInterval(UInt32 interval)
Specifies maximal time interval between two packets.
FeedConnectionSettings & B()
Connection attributes for the secondary (B) feed.
FeedSettingsBase & layout(Layout value)
Defines feed layout for recovery feed group.
FeedConnectionSettings & A()
Connection attributes for the primary (A) feed.
FeedSettingsBase(const SettingGroup *group, Layout layout, UInt32 heartbeat)
Initializes the instance with the given values and optional grouping.
FeedSettingsBase(const FeedSettingsBase &other)
Initializes the instance as a copy of the other one.
The parameters affecting all feeds involved into market data processing.
FeedSettings(SettingChangeController *controller=nullptr)
Initializes the instance with the default values.
RealtimeFeedSettings & incrementalFeeds()
The settings related to incremental feeds.
NetFeedEngine * engine() const
Instance of the Feed Engine to be used by the Handler.
FeedSettings(const FeedSettings &other)
Initializes the instance as a copy of the other one.
friend class PcapReplayHelper
FeedSettings & feedANetworkInterfaces(const std::string &interfaces)
Specifies one or more network interfaces on which to join multicast groups referring to primary (A) f...
const MulticastRecoveryFeedSettings & instrumentFeeds() const
The settings related to instrument feeds.
FeedSettings & packetMaxSize(PacketSize value)
Max size for network packet transmitted by MDP.
FeedSettings & engine(NetFeedEngine *engine)
Defines instance of the Feed Engine to be used by the Handler.
TcpRecoveryFeedSettings & historicalFeeds()
The settings related to historical (TCP Recovery) feeds.
PacketSize packetMaxSize() const
Max size for network packet transmitted by MDP.
FeedSettings & feedBNetworkInterfaces(const std::string &interfaces)
Specifies one or more network interfaces on which to join multicast groups referring to secondary (B)...
const MulticastRecoveryFeedSettings & snapshotFeeds() const
The settings related to snapshot feeds.
const RealtimeFeedSettings & incrementalFeeds() const
The settings related to incremental feeds.
MulticastRecoveryFeedSettings & instrumentFeeds()
The settings related to instrument feeds.
FeedSettings & operator=(const FeedSettings &other)
Re-initializes the instance as a copy of the other one.
friend class HandlerSettings
const MulticastRecoveryFeedSettings & mboSnapshotFeeds() const
The settings related to snapshot feeds.
MulticastRecoveryFeedSettings & snapshotFeeds()
The settings related to snapshot feeds.
MulticastRecoveryFeedSettings & mboSnapshotFeeds()
The settings related to snapshot feeds.
const TcpRecoveryFeedSettings & historicalFeeds() const
The settings related to historical (TCP recovery) feeds.
Represents a setting which is a list of values.
ListSetting & assignNoControl(const ListSetting &other)
Unmanaged assignment of the list.
Collection of parameters affecting recovery feeds behavior.
MulticastRecoveryFeedSettings(const SettingGroup *group=nullptr)
Initializes instance with default values.
~MulticastRecoveryFeedSettings()
Finalizes the instance.
friend class FeedSettings
MulticastRecoveryFeedSettings & operator=(const MulticastRecoveryFeedSettings &other)
Re-initializes the instance as a copy of the other one.
MulticastRecoveryFeedSettings(const MulticastRecoveryFeedSettings &other)
Initializes the instance as a copy of the other one.
Abstraction for the Feed Engine machinery.
Collection of parameters affecting real-time feeds behavior.
RealtimeFeedSettings(const RealtimeFeedSettings &other)
Initializes the instance as a copy of the other one.
RealtimeFeedSettings & outOfOrderPacketMaxInterval(UInt32 intervalLength)
Defines value of threshold used by the Handler while handling out-of-order incoming packets.
~RealtimeFeedSettings()
Finalizes the instance.
RealtimeFeedSettings & operator=(const RealtimeFeedSettings &other)
Re-initializes the instance as a copy of the other one.
RealtimeFeedSettings & lostPacketWaitTime(UInt32 waitTime)
Defines the time limit for the Handler while waiting for expected packets before they considered as l...
friend class FeedSettings
RealtimeFeedSettings(const SettingGroup *group=nullptr)
Initializes instance with default values.
UInt32 lostPacketWaitTime() const
Indicates the time limit for the Handler while waiting for expected packets before they are considere...
UInt32 outOfOrderPacketMaxInterval() const
Defines a threshold used by the Handler while handling out-of-order incoming packets.
Base services for settings grouped by a certain criteria.
void controlAssignment(const Char *description, Assignee &assignee, Value value) const
Guarded assignment of the given value to the given variable.
SettingGroup(SettingChangeController *controller=nullptr)
Initializes the group of settings with the given validation services.
void controlChange(const Char *description, void(Changeable::*change)(), Changeable &changeable) const
Guarded invoke of the given routine which assumes complex change or update for the given object.
Collection of parameters affecting recovery feeds behavior.
TcpRecoveryFeedSettings & connectionAttempts(UInt32 attemptQty)
Number of times the Handler must try recovering from the other feed if it fails to recover from the p...
TcpRecoveryFeedSettings & operator=(const TcpRecoveryFeedSettings &other)
Re-initializes the instance as a copy of the other one.
UInt32 connectionAttempts() const
Number of times the Handler must try recovering from the other feed if it fails to recover from the p...
~TcpRecoveryFeedSettings()
Finalizes the instance.
UInt32 connectionTimeout() const
Interval between the attempts to receive missed packets via the TCP recovery feed if previous attempt...
UInt32 sendTimeout() const
Time limit for the send operation.
TcpRecoveryFeedSettings(const SettingGroup *group=nullptr)
Initializes instance with default values.
TcpRecoveryFeedSettings & connectionTimeout(UInt32 connectionTimeout)
Interval between the attempts to receive missed packets via the TCP recovery feed if previous attempt...
friend class FeedSettings
TcpRecoveryFeedSettings(const TcpRecoveryFeedSettings &other)
Initializes the instance as a copy of the other one.
TcpRecoveryFeedSettings & sendTimeout(UInt32 sendTimeout)
Time limit for the send operation.
ListSetting< std::string > HostListSetting
List of hosts as a setting.
bool fromStr(Decimal &, const Char *, size_t)
Deserializes a decimal number from the given text presentation.
void connectivityFromConfiguration(FeedSettings &, const std::string &, ChannelId, DataCenter::Enum=DataCenter::Primary)
Retrieves connection settings from the given connectivity configuration file for the given channel an...
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
HostListSetting NifListSetting
List of network interfaces as a setting.
UInt16 PacketSize
Integral type for measuring packets.
UInt32 ChannelId
Identifies CME channel.
To optimally service customers and meet regulatory requirements for out-of-region recovery capabiliti...
Enum
To optimally service customers and meet regulatory requirements for out-of-region recovery capabiliti...
@ DisasterRecovery
Indicates data center used in case of disaster.
@ Primary
Indicates the primary data center, which houses all CME applications.
Defines feed layout alternates available for real-time feed like incremental one.
@ FeedBOnly
Indicates only feed B is used as source for market data.
@ FeedBWithFailoverToFeedA
Feed B is used as primary source of market data.
@ BothFeedsWithArbitrage
Handler arbitrates between both feeds A and B.
@ FeedAWithFailoverToFeedB
Feed A is used as primary source of market data.
@ FeedAOnly
Indicates only feed A is used as source for market data.
Defines feed layout alternates available for recovery feeds like instrument and snapshot.
@ FeedBOnly
Indicates only feed B is used as source for market data.
@ FeedBWithFailoverToFeedA
Feed B is used as primary source of market data.
@ FeedAWithFailoverToFeedB
Feed A is used as primary source of market data.
@ FeedAOnly
Indicates only feed A is used as source for market data.
Represents a service controlling change/update operations for the collections of settings.