m2etis  0.4
m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli > Class Template Reference

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>

Inheritance diagram for m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >:
Inheritance graph

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 >
PubSubSystemEnvironmentpssi_
 
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...
 

Detailed Description

template<class NetworkType, uint64_t Timeout, LateDeliver deli>
class m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >

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.

Member Typedef Documentation

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
typedef message::MTPOrderInfo m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::OrderInfoType

Definition at line 60 of file MTPOrder.h.

Constructor & Destructor Documentation

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::MTPOrder ( PubSubSystemEnvironment pssi,
bool  b 
)
inline

Definition at line 62 of file MTPOrder.h.

Here is the call graph for this function:

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
virtual m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::~MTPOrder ( )
inlinevirtual

Definition at line 66 of file MTPOrder.h.

Member Function Documentation

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
bool m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::configureOrderInfo ( uint64_t  id,
const message::ActionType  mtype,
typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  rec 
)
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.

Here is the call graph for this function:

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
bool m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::hasPending ( )
inlinevirtual

pending messages if the buffer is non-empty

Implements m2etis::pubsub::order::BaseOrder< NetworkType >.

Definition at line 73 of file MTPOrder.h.

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
void m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::notifyRemovedMessage ( typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  receiver 
)
inlinevirtual

notified when message dropped by filter or validity strategy

Implements m2etis::pubsub::order::BaseOrder< NetworkType >.

Definition at line 197 of file MTPOrder.h.

Here is the call graph for this function:

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
void m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::otherOrders ( const std::vector< MTPOrder< NetworkType, Timeout, deli > * > &  )
inline

processes a subscribe message

Definition at line 160 of file MTPOrder.h.

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
bool m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::processControlPayload ( typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  sender 
)
inlinevirtual

processes a control message

Implements m2etis::pubsub::order::BaseOrder< NetworkType >.

Definition at line 113 of file MTPOrder.h.

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
void m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::processNotifyPayload ( typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &   
)
inlinevirtual

called for every NotifyMsg that arrived

Implements m2etis::pubsub::order::BaseOrder< NetworkType >.

Definition at line 147 of file MTPOrder.h.

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
void m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::processPublishPayload ( typename message::OrderInfo::Ptr  ,
const typename NetworkType::Key &   
)
inlinevirtual

processes a subscribe message

Implements m2etis::pubsub::order::BaseOrder< NetworkType >.

Definition at line 141 of file MTPOrder.h.

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
void m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::processSubscribePayload ( typename message::OrderInfo::Ptr  ,
const typename NetworkType::Key &   
)
inlinevirtual

processes a subscribe message

Implements m2etis::pubsub::order::BaseOrder< NetworkType >.

Definition at line 135 of file MTPOrder.h.

template<class NetworkType , uint64_t Timeout, LateDeliver deli>
void m2etis::pubsub::order::MTPOrder< NetworkType, Timeout, deli >::receive ( uint64_t  id,
typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &   
)
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.


The documentation for this class was generated from the following file: