Equalizer
1.4.1
|
The producer end of a distributed queue. More...
#include <queueMaster.h>
Public Member Functions | |
CO_API | QueueMaster () |
Construct a new queue master. | |
virtual CO_API | ~QueueMaster () |
Destruct this queue master. | |
CO_API void | push (const QueueItemPacket &packet) |
Enqueue a new item. | |
CO_API void | clear () |
Remove all enqueued items. |
The producer end of a distributed queue.
One instance of this class is registered with a LocalNode to for the producer end of a distributed queue. One or more QueueSlave instances are mapped to this master instance and consume the data.
Definition at line 36 of file queueMaster.h.
CO_API co::QueueMaster::QueueMaster | ( | ) |
Construct a new queue master.
virtual CO_API co::QueueMaster::~QueueMaster | ( | ) | [virtual] |
Destruct this queue master.
CO_API void co::QueueMaster::clear | ( | ) |
Remove all enqueued items.
CO_API void co::QueueMaster::push | ( | const QueueItemPacket & | packet | ) |
Enqueue a new item.
The enqueued item has to inherit from QueueItemPacket and be a flat structure, that is, it should only contain POD data and no pointers. The packet is copied as is over the network, using the packet's size parameter. The packet is copied by this method.
packet | the item to enqueue. |