m2etis  0.4
m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType > Class Template Reference

#include <DirectBroadcastPartition.h>

Inheritance diagram for m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >:
Inheritance graph

Public Types

typedef boost::shared_ptr< EventType > PayloadPtr
 
- Public Types inherited from m2etis::pubsub::partition::BasePartition< NetworkType, EventType >
typedef boost::shared_ptr< EventType > PayloadPtr
 

Public Member Functions

 DirectBroadcastPartition ()
 
virtual ~DirectBroadcastPartition ()
 
void createRendezvousPartition (const typename NetworkType::Key &rendezvous)
 creates a base partition for the RP (dynamic) More...
 
std::vector< int > getTreeNames ()
 returns amount of partitions this strategy contains (static & dynamic) More...
 
std::vector< int >::size_type getPublishTree (const PayloadPtr message, const typename NetworkType::Key &self)
 returns the tree index the given node with the given payload should publish on (static & dynamic) More...
 
std::vector< unsigned int > getSubscribeTrees (boost::shared_ptr< filter::FilterExp< EventType > > dynamic_filter)
 
boost::shared_ptr< filter::FilterExp< EventType > > getPredicate (size_t id)
 returns the predicate for the given partition id (dynamic) More...
 
bool createPartition (const typename NetworkType::Key &root)
 can create a new partition for this channel if a new node (root) joins, return true, if a new partition was created, otherwise false (dynamic) More...
 
void addPartition (boost::shared_ptr< filter::FilterExp< EventType >> predicate, const typename NetworkType::Key &root)
 
void removePartition (size_t id)
 removes the partition with the given id (dynamic) More...
 
void changePredicate (size_t, boost::shared_ptr< filter::FilterExp< EventType >>)
 changes the filter predicate for the partition with the given id (dynamic) More...
 
void changeRoot (size_t id, typename NetworkType::Key &root)
 
std::string toString ()
 
- Public Member Functions inherited from m2etis::pubsub::partition::BasePartition< NetworkType, EventType >
 BasePartition ()
 
virtual ~BasePartition ()
 
virtual std::vector< unsigned int > getSubscribeTrees (boost::shared_ptr< filter::FilterExp< EventType >> dynamic_filter)=0
 returns the tree indices of all trees matching the predicate to subscribe on (static & dynamic) More...
 
virtual void addPartition (boost::shared_ptr< filter::FilterExp< EventType > > predicate, const typename NetworkType::Key &root)=0
 adds a new partition to the strategy at nodes not being RP (dynamic) More...
 

Static Public Attributes

static const bool DYNAMIC_PARTITION
 

Detailed Description

template<typename NetworkType, typename EventType>
class m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >

Definition at line 37 of file DirectBroadcastPartition.h.

Member Typedef Documentation

template<typename NetworkType , typename EventType >
typedef boost::shared_ptr<EventType> m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::PayloadPtr

Definition at line 39 of file DirectBroadcastPartition.h.

Constructor & Destructor Documentation

template<typename NetworkType , typename EventType >
m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::DirectBroadcastPartition ( )
inline

Definition at line 43 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
virtual m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::~DirectBroadcastPartition ( )
inlinevirtual

Definition at line 46 of file DirectBroadcastPartition.h.

Member Function Documentation

template<typename NetworkType , typename EventType >
void m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::addPartition ( boost::shared_ptr< filter::FilterExp< EventType >>  predicate,
const typename NetworkType::Key &  root 
)
inline

Definition at line 100 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
void m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::changePredicate ( size_t  id,
boost::shared_ptr< filter::FilterExp< EventType >>  predicates 
)
inlinevirtual

changes the filter predicate for the partition with the given id (dynamic)

Implements m2etis::pubsub::partition::BasePartition< NetworkType, EventType >.

Definition at line 108 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
void m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::changeRoot ( size_t  id,
typename NetworkType::Key &  root 
)
inlinevirtual
template<typename NetworkType , typename EventType >
bool m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::createPartition ( const typename NetworkType::Key &  root)
inlinevirtual

can create a new partition for this channel if a new node (root) joins, return true, if a new partition was created, otherwise false (dynamic)

Implements m2etis::pubsub::partition::BasePartition< NetworkType, EventType >.

Definition at line 95 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
void m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::createRendezvousPartition ( const typename NetworkType::Key &  rendezvous)
inlinevirtual

creates a base partition for the RP (dynamic)

Implements m2etis::pubsub::partition::BasePartition< NetworkType, EventType >.

Definition at line 48 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
boost::shared_ptr<filter::FilterExp<EventType> > m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::getPredicate ( size_t  id)
inlinevirtual

returns the predicate for the given partition id (dynamic)

Implements m2etis::pubsub::partition::BasePartition< NetworkType, EventType >.

Definition at line 90 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
std::vector<int>::size_type m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::getPublishTree ( const PayloadPtr  message,
const typename NetworkType::Key &  self 
)
inlinevirtual

returns the tree index the given node with the given payload should publish on (static & dynamic)

Implements m2etis::pubsub::partition::BasePartition< NetworkType, EventType >.

Definition at line 64 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
std::vector<unsigned int> m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::getSubscribeTrees ( boost::shared_ptr< filter::FilterExp< EventType > >  dynamic_filter)
inline

Definition at line 75 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
std::vector<int> m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::getTreeNames ( )
inlinevirtual

returns amount of partitions this strategy contains (static & dynamic)

Implements m2etis::pubsub::partition::BasePartition< NetworkType, EventType >.

Definition at line 52 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
void m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::removePartition ( size_t  id)
inlinevirtual

removes the partition with the given id (dynamic)

Implements m2etis::pubsub::partition::BasePartition< NetworkType, EventType >.

Definition at line 104 of file DirectBroadcastPartition.h.

template<typename NetworkType , typename EventType >
std::string m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::toString ( )
inlinevirtual

Member Data Documentation

template<typename NetworkType , typename EventType >
const bool m2etis::pubsub::partition::DirectBroadcastPartition< NetworkType, EventType >::DYNAMIC_PARTITION
static

Definition at line 41 of file DirectBroadcastPartition.h.


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