#include <QueueRegistry.h>
Collaboration diagram for qpid::broker::QueueRegistry:
Public Member Functions | |
QueueRegistry (MessageStore *const store=0) | |
std::pair< Queue::shared_ptr, bool > | declare (const string &name, bool durable=false, uint32_t autodelete=0, const ConnectionToken *const owner=0) |
Declare a queue. | |
void | destroy (const string &name) |
Destroy the named queue. | |
Queue::shared_ptr | find (const string &name) |
Find the named queue. | |
string | generateName () |
Generate unique queue name. | |
MessageStore *const | getStore () const |
Return the message store used. |
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 , |
|||
uint32_t | autodelete = 0 , |
|||
const ConnectionToken *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.