Classes Files

Wombat::MamaQueueGroup

More…

#include <MamaQueueGroup.h>

Public Functions

  Name
virtual ~MamaQueueGroup()
  MamaQueueGroup(int numberOfQueues, mamaBridge bridgeImpl)
virtual void destroyWait()
virtual MamaQueue * getNextQueue()
MamaQueue * getQueueByIndex(int index)
virtual int getNumberOfQueues()
virtual void stopDispatch()
virtual void startDispatch()

Detailed Description

class Wombat::MamaQueueGroup;

A simple class for allocating subscriptions amongst multiple queues in a round robin. This class creates dispatchers for the queues as well.

Public Functions Documentation

function ~MamaQueueGroup

virtual ~MamaQueueGroup()

function MamaQueueGroup

MamaQueueGroup(
    int numberOfQueues,
    mamaBridge bridgeImpl
)

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

function destroyWait

virtual void destroyWait()

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.

function getNextQueue

virtual MamaQueue * getNextQueue()

Return the next available queue from the queue group. Queues are returned in a round robin fashion.

function getQueueByIndex

MamaQueue * getQueueByIndex(
    int index
)

Return: pointer to queue object

Return the requested Queue based on the given index, or NULL if it is not a valid index.

function getNumberOfQueues

virtual int getNumberOfQueues()

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

function stopDispatch

virtual void stopDispatch()

Stop dispatching on queues in the queue group.

function startDispatch

virtual void startDispatch()

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


Updated on 2023-03-31 at 15:29:25 +0100