m2etis  0.4
m2etis::pubsub::order::BaseOrder< NetworkType > Class Template Referenceabstract

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>

Inheritance diagram for m2etis::pubsub::order::BaseOrder< NetworkType >:
Inheritance graph

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

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>
class m2etis::pubsub::order::BaseOrder< NetworkType >

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.

Constructor & Destructor Documentation

template<class NetworkType >
m2etis::pubsub::order::BaseOrder< NetworkType >::BaseOrder ( PubSubSystemEnvironment pssi,
bool  isRoot 
)
inline

Definition at line 41 of file BaseOrder.h.

template<class NetworkType >
virtual m2etis::pubsub::order::BaseOrder< NetworkType >::~BaseOrder ( )
inlinevirtual

Definition at line 42 of file BaseOrder.h.

Member Function Documentation

template<class NetworkType >
void m2etis::pubsub::order::BaseOrder< NetworkType >::configureCallback ( const boost::function< void(uint64_t, msgProcess)> &  func)
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.

template<class NetworkType >
virtual bool m2etis::pubsub::order::BaseOrder< NetworkType >::configureOrderInfo ( uint64_t  id,
const message::ActionType  mtype,
typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  rec 
)
pure virtual
template<class NetworkType >
void m2etis::pubsub::order::BaseOrder< NetworkType >::configureSendCallback ( const boost::function< void(message::OrderInfo::Ptr, const typename NetworkType::Key &, ControlTarget)> &  func)
inline

with this function, new messages can be sent directly to nodes

Definition at line 62 of file BaseOrder.h.

template<class NetworkType >
virtual void m2etis::pubsub::order::BaseOrder< NetworkType >::notifyRemovedMessage ( typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  receiver 
)
pure virtual
template<class NetworkType >
virtual bool m2etis::pubsub::order::BaseOrder< NetworkType >::processControlPayload ( typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  sender 
)
pure virtual
template<class NetworkType >
virtual void m2etis::pubsub::order::BaseOrder< NetworkType >::processNotifyPayload ( typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  sender 
)
pure virtual
template<class NetworkType >
virtual void m2etis::pubsub::order::BaseOrder< NetworkType >::processPublishPayload ( typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  sender 
)
pure virtual
template<class NetworkType >
virtual void m2etis::pubsub::order::BaseOrder< NetworkType >::processSubscribePayload ( typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  sender 
)
pure virtual
template<class NetworkType >
virtual void m2etis::pubsub::order::BaseOrder< NetworkType >::receive ( uint64_t  id,
typename message::OrderInfo::Ptr  ptr,
const typename NetworkType::Key &  sender 
)
pure virtual

called for every message that is ready to be delivered

Parameters
[in]idId to reference the message later
[in]ptrPointer to the OrderStruct of the message
[in]sendercontaints 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 >.

template<class NetworkType >
void m2etis::pubsub::order::BaseOrder< NetworkType >::setHn ( const typename NetworkType::Key &  self)
inline

sets the hostname of the current node

Definition at line 55 of file BaseOrder.h.

template<class NetworkType >
void m2etis::pubsub::order::BaseOrder< NetworkType >::setRoot ( bool  b)
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.

Member Data Documentation

template<class NetworkType >
boost::function<void(uint64_t, msgProcess)> m2etis::pubsub::order::BaseOrder< NetworkType >::function_
protected

stores the function to be called for delivering

  1. Parameter (int): specifies the message id that should be further processed

Definition at line 136 of file BaseOrder.h.

template<class NetworkType >
NetworkType::Key m2etis::pubsub::order::BaseOrder< NetworkType >::hn
protected

hostname of the node

Definition at line 130 of file BaseOrder.h.

template<class NetworkType >
bool m2etis::pubsub::order::BaseOrder< NetworkType >::isRoot_
protected

true if this node is the root node

Definition at line 125 of file BaseOrder.h.

template<class NetworkType >
PubSubSystemEnvironment* m2etis::pubsub::order::BaseOrder< NetworkType >::pssi_
protected

Definition at line 120 of file BaseOrder.h.

template<class NetworkType >
boost::function<void(message::OrderInfo::Ptr, const typename NetworkType::Key &, ControlTarget)> m2etis::pubsub::order::BaseOrder< NetworkType >::sendMsg_
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.

  1. Parameter (OrderInfo::Ptr): Pointer to the OrderStruct to be used
  2. Parameter (string): Name of the target. This can either be a real node identifier or "root" to send directly to the root of this tree

Definition at line 146 of file BaseOrder.h.


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