#include <Queue.h>
Public Types | |
typedef boost::shared_ptr< Queue > | shared_ptr |
typedef std::vector< shared_ptr > | vector |
Public Member Functions | |
virtual void | notifyDurableIOComplete () |
call back to signal async AIO writes have completed (enqueue/dequeue etc) | |
Queue (const string &name, bool autodelete=false, MessageStore *const store=0, const OwnershipToken *const owner=0, management::Manageable *parent=0) | |
bool | dispatch (Consumer::shared_ptr) |
bool | checkForMessages (Consumer::shared_ptr) |
Check whether there would be a message available for dispatch to this consumer. | |
void | create (const qpid::framing::FieldTable &settings) |
void | configure (const qpid::framing::FieldTable &settings) |
void | destroy () |
void | bound (const string &exchange, const string &key, const qpid::framing::FieldTable &args) |
void | unbind (ExchangeRegistry &exchanges, Queue::shared_ptr shared_ref) |
bool | acquire (const QueuedMessage &msg) |
void | deliver (boost::intrusive_ptr< Message > &msg) |
Delivers a message to the queue. | |
void | process (boost::intrusive_ptr< Message > &msg) |
Dispatches the messages immediately to a consumer if one is available or stores it for later if not. | |
void | requeue (const QueuedMessage &msg) |
Returns a message to the in-memory queue (due to lack of acknowledegement from a receiver). | |
void | recover (boost::intrusive_ptr< Message > &msg) |
Used during recovery to add stored messages back to the queue. | |
void | consume (Consumer::shared_ptr c, bool exclusive=false) |
void | cancel (Consumer::shared_ptr c) |
uint32_t | purge (const uint32_t purge_request=0) |
void | purgeExpired () |
uint32_t | move (const Queue::shared_ptr destq, uint32_t qty) |
uint32_t | getMessageCount () const |
uint32_t | getConsumerCount () const |
const string & | getName () const |
bool | isExclusiveOwner (const OwnershipToken *const o) const |
void | releaseExclusiveOwnership () |
bool | setExclusiveOwner (const OwnershipToken *const o) |
bool | hasExclusiveConsumer () const |
bool | hasExclusiveOwner () const |
bool | isDurable () const |
const framing::FieldTable & | getSettings () const |
bool | isAutoDelete () const |
bool | canAutoDelete () const |
const QueueBindings & | getBindings () const |
void | setLastNodeFailure () |
used to take messages from in memory and flush down to disk. | |
void | clearLastNodeFailure () |
bool | enqueue (TransactionContext *ctxt, boost::intrusive_ptr< Message > msg) |
bool | dequeue (TransactionContext *ctxt, const QueuedMessage &msg) |
dequeue from store (only done once messages is acknowledged) | |
QueuedMessage | get () |
Gets the next available message. | |
const QueuePolicy * | getPolicy () |
void | setAlternateExchange (boost::shared_ptr< Exchange > exchange) |
boost::shared_ptr< Exchange > | getAlternateExchange () |
bool | isLocal (boost::intrusive_ptr< Message > &msg) |
uint64_t | getPersistenceId () const |
Returns any identifier the store may have attached to this object. | |
void | setPersistenceId (uint64_t persistenceId) const |
Allows the store to attach its own identifier to this object. | |
void | encode (framing::Buffer &buffer) const |
Encodes the persistable state of this object into the supplied buffer. | |
uint32_t | encodedSize () const |
virtual void | setExternalQueueStore (ExternalQueueStore *inst) |
management::ManagementObject * | GetManagementObject (void) const |
management::Manageable::status_t | ManagementMethod (uint32_t methodId, management::Args &args, std::string &text) |
template<class F> | |
void | eachMessage (F f) const |
Apply f to each Message on the queue. | |
template<class F> | |
void | eachBinding (F f) |
Apply f to each QueueBinding on the queue. | |
bool | releaseMessageContent (const QueuedMessage &) |
void | popMsg (QueuedMessage &qmsg) |
Static Public Member Functions | |
static Queue::shared_ptr | decode (QueueRegistry &queues, framing::Buffer &buffer) |
static void | tryAutoDelete (Broker &broker, Queue::shared_ptr) |
Messages are delivered to a queue from where they can be dispatched to registered consumers or be stored until dequeued or until one or more consumers registers.
Definition at line 64 of file Queue.h.
virtual void qpid::broker::Queue::notifyDurableIOComplete | ( | ) | [virtual] |
call back to signal async AIO writes have completed (enqueue/dequeue etc)
Note: DO NOT do work on this callback, if you block this callback you will block the store.
Implements qpid::broker::PersistableQueue.
bool qpid::broker::Queue::checkForMessages | ( | Consumer::shared_ptr | ) |
Check whether there would be a message available for dispatch to this consumer.
If not, the consumer will be notified of events that may have changed this situation.
void qpid::broker::Queue::deliver | ( | boost::intrusive_ptr< Message > & | msg | ) |
Delivers a message to the queue.
Will record it as enqueued if persistent then process it.
void qpid::broker::Queue::requeue | ( | const QueuedMessage & | msg | ) |
Returns a message to the in-memory queue (due to lack of acknowledegement from a receiver).
If a consumer is available it will be dispatched immediately, else it will be returned to the front of the queue.
uint32_t qpid::broker::Queue::encodedSize | ( | ) | const [virtual] |
void qpid::broker::Queue::eachMessage | ( | F | f | ) | const [inline] |