OpenMAMA C++ API
Wombat::MamaQueueGroup Class Reference

A simple class for allocating subscriptions amongst multiple queues in a round robin. More...

#include <MamaQueueGroup.h>

Public Member Functions

virtual ~MamaQueueGroup ()
 
 MamaQueueGroup (int numberOfQueues, mamaBridge bridgeImpl)
 If numberOfQueues == 0, getNextQueue returns the default queue for the bridge. More...
 
virtual void destroyWait ()
 Destroy all the queues. More...
 
virtual MamaQueuegetNextQueue ()
 Return the next available queue from the queue group. More...
 
virtual int getNumberOfQueues ()
 Return the number of MamaQueues currently managed by this queue group. More...
 
virtual void stopDispatch ()
 Stop dispatching on queues in the queue group. More...
 
virtual void startDispatch ()
 Start dispatching on all queues in a group. More...
 

Detailed Description

A simple class for allocating subscriptions amongst multiple queues in a round robin.

This class creates dispatchers for the queues as well.

Constructor & Destructor Documentation

§ ~MamaQueueGroup()

virtual Wombat::MamaQueueGroup::~MamaQueueGroup ( )
virtual

§ MamaQueueGroup()

Wombat::MamaQueueGroup::MamaQueueGroup ( int  numberOfQueues,
mamaBridge  bridgeImpl 
)

If numberOfQueues == 0, getNextQueue returns the default queue for the bridge.

Member Function Documentation

§ destroyWait()

virtual void Wombat::MamaQueueGroup::destroyWait ( )
virtual

Destroy all the queues.

Note that a queue can only be destroyed if all of the objects created on it, (timers, subscriptions etc), have been destroyed. This function will block until all of the objects have been destroyed and will then destroy the queues.

§ getNextQueue()

virtual MamaQueue* Wombat::MamaQueueGroup::getNextQueue ( )
virtual

Return the next available queue from the queue group.

Queues are returned in a round robin fashion.

§ getNumberOfQueues()

virtual int Wombat::MamaQueueGroup::getNumberOfQueues ( )
virtual

Return the number of MamaQueues currently managed by this queue group.

§ stopDispatch()

virtual void Wombat::MamaQueueGroup::stopDispatch ( )
virtual

Stop dispatching on queues in the queue group.

§ startDispatch()

virtual void Wombat::MamaQueueGroup::startDispatch ( )
virtual

Start dispatching on all queues in a group.

NOTE: This only should be used after a previous call to stopDispatch. Dispatching on a queue is started hwen it is created