#include <MamaQueue.h>
Name | |
---|---|
MamaQueue(void ) | |
MamaQueue(mamaQueue cQueue) | |
virtual | ~MamaQueue(void ) |
virtual void | create(mamaBridge bridgeImpl) |
virtual void | create(mamaBridge bridgeImpl, void * nativeQueue) |
virtual void | dispatch() |
virtual void | timedDispatch(uint64_t timeout) |
virtual void | dispatchEvent() |
virtual void | enqueueEvent(MamaQueueEventCallback * callback, void * closure) |
virtual void | enqueueEvent(MamaQueueEventCallback & callback, void * closure) |
virtual void | stopDispatch() |
virtual size_t | getEventCount() |
virtual void | setEnqueueCallback(MamaQueueEnqueueCallback * cb, void * closure) |
virtual void | setQueueMonitorCallback(MamaQueueMonitorCallback * cb, void * closure) |
virtual void | setHighWatermark(size_t highWatermark) |
virtual size_t | getHighWatermark(void ) const |
virtual void | setLowWatermark(size_t lowWatermark) |
virtual size_t | getLowWatermark(void ) const |
virtual void | setQueueName(const char * name) |
virtual const char * | getQueueName() const |
virtual const char * | getQueueBridgeName() const |
virtual void | destroy() |
virtual void | setClosure(void * closure) |
virtual void * | getClosure() |
virtual void | destroyTimedWait(long timeout) |
virtual void | destroyWait() |
mamaQueue | getCValue() |
const mamaQueue | getCValue() const |
void | setCValue(mamaQueue cQueue) |
Name | |
---|---|
MamaQueueImpl * | mPimpl |
class Wombat::MamaQueue;
Queue allows applications to dispatch events in order with multiple threads using a single MamaDispatcher for each queue.
MamaQueue(
void
)
MamaQueue(
mamaQueue cQueue
)
virtual ~MamaQueue(
void
)
virtual void create(
mamaBridge bridgeImpl
)
Return: a pointer the queue.
Create a queue. Queues allow applications to dispatch events in order with multiple threads using a single mamaDispatcher for each queue.
Callers should call delete queue when done.
virtual void create(
mamaBridge bridgeImpl,
void * nativeQueue
)
virtual void dispatch()
Dispatch message. Blocks and dispatches messages until unblock is called.
virtual void timedDispatch(
uint64_t timeout
)
Dispatch messages from the queue until timeout has elapsed. Some middleware implementations will always block until timeout (dispatching multiple times), whereas others will always unblock once the first event is dispatched or the timeout has elapsed - whichever comes first.
virtual void dispatchEvent()
Dispatch a single event from the specified queue. If there is no event on the queue simply return and do nothing
virtual void enqueueEvent(
MamaQueueEventCallback * callback,
void * closure
)
Parameters:
Exceptions:
Add a user event to a queue.
virtual void enqueueEvent(
MamaQueueEventCallback & callback,
void * closure
)
virtual void stopDispatch()
stopDispatch the queue.
virtual size_t getEventCount()
Return: size_t The number of the events on the queue.
Returns the number of events currently on the queue.
virtual void setEnqueueCallback(
MamaQueueEnqueueCallback * cb,
void * closure
)
Parameters:
Set a callback which will be invoked as each event is added to the underlying event queue.
virtual void setQueueMonitorCallback(
MamaQueueMonitorCallback * cb,
void * closure
)
Parameters:
Register an object to receive callbacks for monitoring the behaviour of the MamaQueue.
virtual void setHighWatermark(
size_t highWatermark
)
Specify a high watermark for events on the queue.
The behaviour for setting this value varies depending on the underlying middleware.
LBM: LBM uses an unbounded event queue. Setting this values allows users of the API to receive a callback if the value is exceeded. (See mamaQueue_setQueueMonitorCallback() for setting queue related callbacks) the default behaviour is for the queue to grow unbounded without notifications. The high watermark for LBM can be set for all queues at once by setting the mama.lbm.eventqueuemonitor.queue_size_warning property for the API. Calls to this function will override the value specified in mama.properties.
RV: This will set a queue limit policy of TIBRVQUEUE_DISCARD_FIRST whereby the oldest events in the queue are discarded first. The discard amount will be set with a value of 1. i.e. events will be dropped from the queue one at a time. The default behaviour is an unlimited queue which does not discard events.
virtual size_t getHighWatermark(
void
) const
Return the high water mark as set via setHighWaterMark()
virtual void setLowWatermark(
size_t lowWatermark
)
Parameters:
Set the low watermark. Only supported for Wombat TCP middleware.
virtual size_t getLowWatermark(
void
) const
Return the low water mark as set via setLowWaterMark()
virtual void setQueueName(
const char * name
)
Parameters:
Associate a name identifier with the event queue. This will be used in queue related logging statements. The string is copied by the API.
virtual const char * getQueueName() const
Return: The name identifier for the MamaQueue.
Retrieve the string name identifier for the queue as specified from a call to [setQueueName()](classWombat_1_1MamaQueue.html#function-setqueuename)
. If a name has not been specified via a call to[setQueueName()](classWombat_1_1MamaQueue.html#function-setqueuename)
the queue will assume a default name of “NO_NAME”
virtual const char * getQueueBridgeName() const
Return: The name identifier for the bridge: “wmw”, “lbm”, or “tibrv”.
Retrieve the string name identifier for the queue’s bridge.
virtual void destroy()
Parameters:
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.
virtual void setClosure(
void * closure
)
virtual void * getClosure()
virtual void destroyTimedWait(
long timeout
)
Parameters:
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 for the specified time or until all of the objects have been destroyed and will then destroy the queue.
virtual 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.
mamaQueue getCValue()
Access to C types for implementation of related classes.
const mamaQueue getCValue() const
void setCValue(
mamaQueue cQueue
)
This can only be set once and only if the c value is not already set - E.g. from calling create()
MamaQueueImpl * mPimpl;
Updated on 2023-03-31 at 15:29:25 +0100