Classes Files

com::wombat::mama::MamaQueueGroup

More…

Public Functions

  Name
  MamaQueueGroup(int numberOfQueues, MamaBridge bridge)
int getNumberOfQueues()
void destroy()
void destroyWait()
void destroyTimedWait(long timeout)
MamaQueue getNextQueue()
MamaQueue getQueueByIndex(int index)
void stopDispatch()
void startDispatch()

Detailed Description

class com::wombat::mama::MamaQueueGroup;

A simple class for distributing events across multiple queues in a round robin.

Public Functions Documentation

function MamaQueueGroup

inline MamaQueueGroup(
    int numberOfQueues,
    MamaBridge bridge
)

Parameters:

  • numberOfQueues The number of queues to create.

Create a [MamaQueueGroup](classcom_1_1wombat_1_1mama_1_1MamaQueueGroup.html) with the specified number of [MamaQueue](classcom_1_1wombat_1_1mama_1_1MamaQueue.html)s. If the number of queues is 0, [getNextQueue()](classcom_1_1wombat_1_1mama_1_1MamaQueueGroup.html#function-getnextqueue) returns the default queue for the bridge.

function getNumberOfQueues

inline int getNumberOfQueues()

Return number of queues in the array. C++ returns 0 if the array is empty and the default queue is being used.

function destroy

inline void destroy()

Exceptions:

Destroy the queue, this function should only be called if there are no open objects against the queue. Use one of the other destroy functions to block until all objects have been cleaned up.

function destroyWait

inline void destroyWait()

Destroy a queue. Note that the 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 queue.

function destroyTimedWait

inline void destroyTimedWait(
    long timeout
)

Parameters:

  • timeout The time to block for in milliseconds.

Exceptions:

Destroy a queue. Note that the 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 queue.

function getNextQueue

inline MamaQueue getNextQueue()

Return: The next queue.

Return the next queue. The queues are returned in a round robin.

function getQueueByIndex

inline MamaQueue getQueueByIndex(
    int index
)

Return: The queue object

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

function stopDispatch

inline void stopDispatch()

function startDispatch

inline void startDispatch()

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