Queue allows applications to dispatch events in order with multiple threads using a single MamaDispatcher for each queue.
More...
#include <MamaQueue.h>
Public Attributes |
MamaQueueImpl * | mPimpl |
Detailed Description
Queue allows applications to dispatch events in order with multiple threads using a single MamaDispatcher for each queue.
Constructor & Destructor Documentation
Wombat::MamaQueue::MamaQueue |
( |
void |
| ) |
|
Wombat::MamaQueue::MamaQueue |
( |
mamaQueue |
cQueue | ) |
|
virtual Wombat::MamaQueue::~MamaQueue |
( |
void |
| ) |
|
|
virtual |
Member Function Documentation
virtual void Wombat::MamaQueue::create |
( |
mamaBridge |
bridgeImpl | ) |
|
|
virtual |
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.
- Returns
- a pointer the queue.
virtual void Wombat::MamaQueue::create |
( |
mamaBridge |
bridgeImpl, |
|
|
void * |
nativeQueue |
|
) |
| |
|
virtual |
virtual void Wombat::MamaQueue::dispatch |
( |
| ) |
|
|
virtual |
Dispatch message.
Blocks and dispatches messages until unblock is called.
virtual void Wombat::MamaQueue::timedDispatch |
( |
uint64_t |
timeout | ) |
|
|
virtual |
Dispatch messages until timeout (see release notes for details)
virtual void Wombat::MamaQueue::dispatchEvent |
( |
| ) |
|
|
virtual |
Dispatch a single event from the specified queue.
If there is no event on the queue simply return and do nothing
Add a user event to a queue.
- Parameters
-
- Exceptions
-
MamaException | Not currently implemented for pure Java API. |
virtual void Wombat::MamaQueue::stopDispatch |
( |
| ) |
|
|
virtual |
virtual size_t Wombat::MamaQueue::getEventCount |
( |
| ) |
|
|
virtual |
Returns the number of events currently on the queue.
- Returns
- size_t The number of the events on the queue.
Set a callback which will be invoked as each event is added to the underlying event queue.
- Parameters
-
cb | Pointer to an instance of MamaQueueEnqueueCallback |
closure | Arbitrary user supplied data. Passed back to onEventEnqueue() for each event enqueued. |
Register an object to receive callbacks for monitoring the behaviour of the MamaQueue.
- Parameters
-
cb | Reference to the object which will receive callbacks. |
closure | User supplied data which will be returned as the callbacks are invoked. |
virtual void Wombat::MamaQueue::setHighWatermark |
( |
size_t |
highWatermark | ) |
|
|
virtual |
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 Wombat::MamaQueue::getHighWatermark |
( |
void |
| ) |
const |
|
virtual |
Return the high water mark as set via setHighWaterMark()
virtual void Wombat::MamaQueue::setLowWatermark |
( |
size_t |
lowWatermark | ) |
|
|
virtual |
Set the low watermark.
Only supported for Wombat TCP middleware.
- Parameters
-
lowWatermark | The low water mark. |
virtual size_t Wombat::MamaQueue::getLowWatermark |
( |
void |
| ) |
const |
|
virtual |
Return the low water mark as set via setLowWaterMark()
virtual void Wombat::MamaQueue::setQueueName |
( |
const char * |
name | ) |
|
|
virtual |
Associate a name identifier with the event queue.
This will be used in queue related logging statements. The string is copied by the API.
- Parameters
-
name | The string name identifier for the queue. |
virtual const char* Wombat::MamaQueue::getQueueName |
( |
| ) |
const |
|
virtual |
Retrieve the string name identifier for the queue as specified from a call to setQueueName()
.
If a name has not been specified via a call tosetQueueName()
the queue will assume a default name of "NO_NAME"
- Returns
- The name identifier for the MamaQueue.
virtual const char* Wombat::MamaQueue::getQueueBridgeName |
( |
| ) |
const |
|
virtual |
Retrieve the string name identifier for the queue's bridge.
- Returns
- The name identifier for the bridge: "wmw", "lbm", or "tibrv".
virtual void Wombat::MamaQueue::destroy |
( |
| ) |
|
|
virtual |
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.
- Parameters
-
- Exceptions
-
MamaStatus | with a code of MAMA_STATUS_QUEUE_OPEN_OBJECTS if there are still objects open against the queue. |
virtual void Wombat::MamaQueue::setClosure |
( |
void * |
closure | ) |
|
|
virtual |
virtual void* Wombat::MamaQueue::getClosure |
( |
| ) |
|
|
virtual |
virtual void Wombat::MamaQueue::destroyTimedWait |
( |
long |
timeout | ) |
|
|
virtual |
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.
- Parameters
-
timeout | The time to block for in ms. |
- Exceptions
-
MamaStatus | with a code of MAMA_STATUS_TIMEOUT if the time elapsed. |
virtual void Wombat::MamaQueue::destroyWait |
( |
| ) |
|
|
virtual |
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 Wombat::MamaQueue::getCValue |
( |
| ) |
|
Access to C types for implementation of related classes.
const mamaQueue Wombat::MamaQueue::getCValue |
( |
| ) |
const |
void Wombat::MamaQueue::setCValue |
( |
mamaQueue |
cQueue | ) |
|
This can only be set once and only if the c value is not already set - E.g.
from calling create()
Member Data Documentation
MamaQueueImpl* Wombat::MamaQueue::mPimpl |
The documentation for this class was generated from the following file: