m2etis
0.4
|
This is the interface that should be used for all Order Strategies It specifies all functions that shold be overloaded in every strategy as well as some commonly needed functions. More...
#include <BaseOrder.h>
Public Member Functions | |
BaseOrder (PubSubSystemEnvironment *pssi, bool isRoot) | |
virtual | ~BaseOrder () |
void | configureCallback (const boost::function< void(uint64_t, msgProcess)> &func) |
used to set the function to be called when a message should be send to the next processing stage call this function with the id given in receive() to deliver the appropriate message More... | |
void | setHn (const typename NetworkType::Key &self) |
sets the hostname of the current node More... | |
void | configureSendCallback (const boost::function< void(message::OrderInfo::Ptr, const typename NetworkType::Key &, ControlTarget)> &func) |
with this function, new messages can be sent directly to nodes More... | |
void | setRoot (bool b) |
sets whether this node is the root node. Several strategies need this to determind the sequencer More... | |
virtual bool | hasPending ()=0 |
returns whether some messages are still waiting More... | |
virtual bool | configureOrderInfo (uint64_t id, const message::ActionType mtype, typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &rec)=0 |
called for every message to be sent More... | |
virtual bool | processControlPayload (typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0 |
called for every ControlMsg that arrived More... | |
virtual void | processSubscribePayload (typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0 |
called for every SubscribeMsg that arrived More... | |
virtual void | processPublishPayload (typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0 |
called for every PublishMsg that arrived More... | |
virtual void | processNotifyPayload (typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0 |
called for every NotifyMsg that arrived More... | |
virtual void | receive (uint64_t id, typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0 |
called for every message that is ready to be delivered More... | |
virtual void | notifyRemovedMessage (typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &receiver)=0 |
notified when message dropped by filter or validity strategy More... | |
Protected Attributes | |
PubSubSystemEnvironment * | pssi_ |
bool | isRoot_ |
true if this node is the root node More... | |
NetworkType::Key | hn |
hostname of the node More... | |
boost::function< void(uint64_t, msgProcess)> | function_ |
stores the function to be called for delivering More... | |
boost::function< void(message::OrderInfo::Ptr, const typename NetworkType::Key &, ControlTarget)> | sendMsg_ |
stores the function to send new messages This function will send a newly created control message containing the given OrderStruct to the specified sender. The Tree ensures that this message will be sent to the specified receiver and will not be processed by any other strategie. More... | |
This is the interface that should be used for all Order Strategies It specifies all functions that shold be overloaded in every strategy as well as some commonly needed functions.
Definition at line 39 of file BaseOrder.h.
|
inline |
Definition at line 41 of file BaseOrder.h.
|
inlinevirtual |
Definition at line 42 of file BaseOrder.h.
|
inline |
used to set the function to be called when a message should be send to the next processing stage call this function with the id given in receive() to deliver the appropriate message
Definition at line 48 of file BaseOrder.h.
|
pure virtual |
called for every message to be sent
Implemented in m2etis::pubsub::order::GMSOrder< NetworkType, Timeout >, m2etis::pubsub::order::DetMergeOrder< NetworkType, Config >, m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >, and m2etis::pubsub::order::NullOrder< NetworkType >.
|
inline |
with this function, new messages can be sent directly to nodes
Definition at line 62 of file BaseOrder.h.
|
pure virtual |
returns whether some messages are still waiting
Implemented in m2etis::pubsub::order::GMSOrder< NetworkType, Timeout >, m2etis::pubsub::order::DetMergeOrder< NetworkType, Config >, m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >, and m2etis::pubsub::order::NullOrder< NetworkType >.
|
pure virtual |
notified when message dropped by filter or validity strategy
Implemented in m2etis::pubsub::order::GMSOrder< NetworkType, Timeout >, m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >, m2etis::pubsub::order::DetMergeOrder< NetworkType, Config >, and m2etis::pubsub::order::NullOrder< NetworkType >.
|
pure virtual |
called for every ControlMsg that arrived
Implemented in m2etis::pubsub::order::GMSOrder< NetworkType, Timeout >, m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >, m2etis::pubsub::order::DetMergeOrder< NetworkType, Config >, and m2etis::pubsub::order::NullOrder< NetworkType >.
|
pure virtual |
called for every NotifyMsg that arrived
Implemented in m2etis::pubsub::order::GMSOrder< NetworkType, Timeout >, m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >, m2etis::pubsub::order::DetMergeOrder< NetworkType, Config >, and m2etis::pubsub::order::NullOrder< NetworkType >.
|
pure virtual |
called for every PublishMsg that arrived
Implemented in m2etis::pubsub::order::GMSOrder< NetworkType, Timeout >, m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >, m2etis::pubsub::order::DetMergeOrder< NetworkType, Config >, and m2etis::pubsub::order::NullOrder< NetworkType >.
|
pure virtual |
called for every SubscribeMsg that arrived
Implemented in m2etis::pubsub::order::GMSOrder< NetworkType, Timeout >, m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >, m2etis::pubsub::order::DetMergeOrder< NetworkType, Config >, and m2etis::pubsub::order::NullOrder< NetworkType >.
|
pure virtual |
called for every message that is ready to be delivered
[in] | id | Id to reference the message later |
[in] | ptr | Pointer to the OrderStruct of the message |
[in] | sender | containts the sender of the message |
Implemented in m2etis::pubsub::order::GMSOrder< NetworkType, Timeout >, m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >, m2etis::pubsub::order::DetMergeOrder< NetworkType, Config >, and m2etis::pubsub::order::NullOrder< NetworkType >.
|
inline |
sets the hostname of the current node
Definition at line 55 of file BaseOrder.h.
|
inline |
sets whether this node is the root node. Several strategies need this to determind the sequencer
Definition at line 69 of file BaseOrder.h.
|
protected |
stores the function to be called for delivering
Definition at line 136 of file BaseOrder.h.
|
protected |
hostname of the node
Definition at line 130 of file BaseOrder.h.
|
protected |
true if this node is the root node
Definition at line 125 of file BaseOrder.h.
|
protected |
Definition at line 120 of file BaseOrder.h.
|
protected |
stores the function to send new messages This function will send a newly created control message containing the given OrderStruct to the specified sender. The Tree ensures that this message will be sent to the specified receiver and will not be processed by any other strategie.
Definition at line 146 of file BaseOrder.h.