m2etis
0.4
|
This class implements the MTP Order strategy The root node is used as a fixed sequencer. Every node that wants to send a message, request a sequenzer number (TOKEN) from the sequencer and afterwards sends his message along with this sequence number. More...
#include <MTPOrder.h>
Public Types | |
typedef message::MTPOrderInfo | OrderInfoType |
Public Member Functions | |
MTPOrder (PubSubSystemEnvironment *pssi, bool b) | |
virtual | ~MTPOrder () |
bool | hasPending () |
pending messages if the buffer is non-empty More... | |
bool | configureOrderInfo (uint64_t id, const message::ActionType mtype, typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &rec) |
used to manage sending a message All messages but Publish messages can be sent directly without any special treatment Publish messages however need to be stored until a sequence number is available More... | |
bool | processControlPayload (typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender) |
processes a control message More... | |
void | processSubscribePayload (typename message::OrderInfo::Ptr, const typename NetworkType::Key &) |
processes a subscribe message More... | |
void | processPublishPayload (typename message::OrderInfo::Ptr, const typename NetworkType::Key &) |
processes a subscribe message More... | |
void | processNotifyPayload (typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &) |
called for every NotifyMsg that arrived More... | |
void | otherOrders (const std::vector< MTPOrder * > &) |
processes a subscribe message More... | |
void | receive (uint64_t id, typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &) |
receives a message stores the message in the queue and wait for it's deliver More... | |
void | notifyRemovedMessage (typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &receiver) |
notified when message dropped by filter or validity strategy More... | |
Public Member Functions inherited from m2etis::pubsub::order::BaseOrder< NetworkType > | |
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... | |
Additional Inherited Members | |
Protected Attributes inherited from m2etis::pubsub::order::BaseOrder< NetworkType > | |
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 class implements the MTP Order strategy The root node is used as a fixed sequencer. Every node that wants to send a message, request a sequenzer number (TOKEN) from the sequencer and afterwards sends his message along with this sequence number.
Definition at line 58 of file MTPOrder.h.
typedef message::MTPOrderInfo m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::OrderInfoType |
Definition at line 60 of file MTPOrder.h.
|
inline |
|
inlinevirtual |
Definition at line 66 of file MTPOrder.h.
|
inlinevirtual |
used to manage sending a message All messages but Publish messages can be sent directly without any special treatment Publish messages however need to be stored until a sequence number is available
Implements m2etis::pubsub::order::BaseOrder< NetworkType >.
Definition at line 82 of file MTPOrder.h.
|
inlinevirtual |
pending messages if the buffer is non-empty
Implements m2etis::pubsub::order::BaseOrder< NetworkType >.
Definition at line 73 of file MTPOrder.h.
|
inlinevirtual |
notified when message dropped by filter or validity strategy
Implements m2etis::pubsub::order::BaseOrder< NetworkType >.
Definition at line 197 of file MTPOrder.h.
|
inline |
processes a subscribe message
Definition at line 160 of file MTPOrder.h.
|
inlinevirtual |
processes a control message
Implements m2etis::pubsub::order::BaseOrder< NetworkType >.
Definition at line 113 of file MTPOrder.h.
|
inlinevirtual |
called for every NotifyMsg that arrived
Implements m2etis::pubsub::order::BaseOrder< NetworkType >.
Definition at line 147 of file MTPOrder.h.
|
inlinevirtual |
processes a subscribe message
Implements m2etis::pubsub::order::BaseOrder< NetworkType >.
Definition at line 141 of file MTPOrder.h.
|
inlinevirtual |
processes a subscribe message
Implements m2etis::pubsub::order::BaseOrder< NetworkType >.
Definition at line 135 of file MTPOrder.h.
|
inlinevirtual |
receives a message stores the message in the queue and wait for it's deliver
Implements m2etis::pubsub::order::BaseOrder< NetworkType >.
Definition at line 167 of file MTPOrder.h.