#include <QueueRegistry.h>
Public Member Functions | |
std::pair< Queue::shared_ptr, bool > | declare (const string &name, bool durable=false, bool autodelete=false, const OwnershipToken *const 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. |
Queues are reference counted using shared_ptr to ensure that they are deleted when and only when they are no longer in use.
std::pair<Queue::shared_ptr, bool> qpid::broker::QueueRegistry::declare | ( | const string & | name, | |
bool | durable = false , |
|||
bool | autodelete = false , |
|||
const OwnershipToken *const | 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.