Equalizer  1.4.1
Public Member Functions
co::QueueSlave Class Reference

The consumer end of a distributed queue. More...

#include <queueSlave.h>

+ Inheritance diagram for co::QueueSlave:
+ Collaboration diagram for co::QueueSlave:

List of all members.

Public Member Functions

CO_API QueueSlave (const uint32_t prefetchMark=Global::getIAttribute(Global::IATTR_QUEUE_MIN_SIZE), const uint32_t prefetchAmount=Global::getIAttribute(Global::IATTR_QUEUE_REFILL))
 Construct a new queue consumer.
virtual CO_API ~QueueSlave ()
 Destruct this new queue consumer.
CO_API Commandpop ()
 Pop an item from the distributed queue.

Detailed Description

The consumer end of a distributed queue.

One or more instances of this class are mapped to the identifier of the QueueMaster registered on another node.

Definition at line 37 of file queueSlave.h.


Constructor & Destructor Documentation

CO_API co::QueueSlave::QueueSlave ( const uint32_t  prefetchMark = Global::getIAttribute(Global::IATTR_QUEUE_MIN_SIZE),
const uint32_t  prefetchAmount = Global::getIAttribute(Global::IATTR_QUEUE_REFILL) 
)

Construct a new queue consumer.

The implementation will prefetch items from the queue master to cache thems locally. The prefetchMark determines when new items are requested, and the prefetchAmount how many items are fetched. Prefetching items hides the network latency by pipelining the network communication with the processing but may introduce imbalance between queue slaves if used aggressively.

Parameters:
prefetchMarkthe low-water mark for prefetching.
prefetchAmountthe refill quantity when prefetching.
Version:
1.1.6
virtual CO_API co::QueueSlave::~QueueSlave ( ) [virtual]

Destruct this new queue consumer.

Version:
1.1.6

Member Function Documentation

Pop an item from the distributed queue.

If the queue is empty, 0 is returned. Otherwise the returned command has to be released by the caller.

Returns:
the popped command, or 0 if the queue was empty.
Version:
1.1.6

The documentation for this class was generated from the following file:
Generated on Mon Nov 26 2012 14:41:50 for Equalizer 1.4.1 by  doxygen 1.7.6.1