diff options
author | Carl C. Trieloff <cctrieloff@apache.org> | 2007-11-12 15:38:56 +0000 |
---|---|---|
committer | Carl C. Trieloff <cctrieloff@apache.org> | 2007-11-12 15:38:56 +0000 |
commit | df5ec6f74a070a5e6f67168124839b6c638ef918 (patch) | |
tree | b80f243e7db52bebb967f43d26edbca39d94c0fb /cpp/src | |
parent | 93632ea079f380ca8d9b4ce90dff939b4772e01a (diff) | |
download | qpid-python-df5ec6f74a070a5e6f67168124839b6c638ef918.tar.gz |
- notify the queue when a async IO completes for a message.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@594186 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/broker/PersistableMessage.h | 5 | ||||
-rw-r--r-- | cpp/src/qpid/broker/PersistableQueue.h | 4 | ||||
-rw-r--r-- | cpp/src/qpid/broker/Queue.h | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/cpp/src/qpid/broker/PersistableMessage.h b/cpp/src/qpid/broker/PersistableMessage.h index a63ca2a52b..1a4ac6b891 100644 --- a/cpp/src/qpid/broker/PersistableMessage.h +++ b/cpp/src/qpid/broker/PersistableMessage.h @@ -108,6 +108,11 @@ public: if (asyncEnqueueCounter > 0) { if (--asyncEnqueueCounter == 0) { asyncEnqueueLock.notify(); + if (store) { + for (syncList::iterator i = synclist.begin(); i != synclist.end(); ++i) { + (*i)->notifyDurableIOComplete(); + } + } } } } diff --git a/cpp/src/qpid/broker/PersistableQueue.h b/cpp/src/qpid/broker/PersistableQueue.h index 2a352b3e9b..2d30513884 100644 --- a/cpp/src/qpid/broker/PersistableQueue.h +++ b/cpp/src/qpid/broker/PersistableQueue.h @@ -70,15 +70,15 @@ public: }; -protected: /** - * call back for the store to signal AIO writes have + * 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. */ virtual void notifyDurableIOComplete() = 0; +protected: ExternalQueueStore* externalQueueStore; diff --git a/cpp/src/qpid/broker/Queue.h b/cpp/src/qpid/broker/Queue.h index 20eb7c0800..a1bbe275da 100644 --- a/cpp/src/qpid/broker/Queue.h +++ b/cpp/src/qpid/broker/Queue.h @@ -113,13 +113,9 @@ namespace qpid { bool getNextMessage(QueuedMessage& msg); bool exclude(Message::shared_ptr msg); - protected: - /** - * Call back from store - */ - virtual void notifyDurableIOComplete(); public: + virtual void notifyDurableIOComplete(); typedef boost::shared_ptr<Queue> shared_ptr; typedef std::vector<shared_ptr> vector; |