#include <QueueRegistry.h>
Public Member Functions | |
std::pair< Queue::shared_ptr, bool > | declare (const string &name, bool durable=false, bool autodelete=false, const OwnershipToken *owner=0) |
Declare a queue. | |
void | destroy (const string &name) |
Destroy the named queue. | |
template<class Test> | |
bool | destroyIf (const string &name, Test test) |
Queue::shared_ptr | find (const string &name) |
Find the named queue. | |
string | generateName () |
Generate unique queue name. | |
void | setStore (MessageStore *) |
Set the store to use. | |
MessageStore * | getStore () const |
Return the message store used. | |
void | setParent (management::Manageable *_parent) |
Register the manageable parent for declared queues. | |
template<class F> | |
void | eachQueue (F f) const |
Call f for each queue in the registry. | |
void | updateQueueClusterState (bool lastNode) |
Change queue mode when cluster size drops to 1 node, expands again in practice allows flow queue to disk when last name to be exectuted. |
Queues are reference counted using shared_ptr to ensure that they are deleted when and only when they are no longer in use.
Definition at line 41 of file QueueRegistry.h.
std::pair<Queue::shared_ptr, bool> qpid::broker::QueueRegistry::declare | ( | const string & | name, | |
bool | durable = false , |
|||
bool | autodelete = false , |
|||
const OwnershipToken * | owner = 0 | |||
) |
Declare a queue.
void qpid::broker::QueueRegistry::destroy | ( | const string & | name | ) |
Destroy the named queue.
Note: if the queue is in use it is not actually destroyed until all shared_ptrs to it are destroyed. During that time it is possible that a new queue with the same name may be created. This should not create any problems as the new and old queues exist independently. The registry has forgotten the old queue so there can be no confusion for subsequent calls to find or declare with the same name.
Queue::shared_ptr qpid::broker::QueueRegistry::find | ( | const string & | name | ) |
Find the named queue.
Return 0 if not found.
void qpid::broker::QueueRegistry::setStore | ( | MessageStore * | ) |
Set the store to use.
May only be called once.
void qpid::broker::QueueRegistry::eachQueue | ( | F | f | ) | const [inline] |