summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorCarl C. Trieloff <cctrieloff@apache.org>2007-11-12 15:38:56 +0000
committerCarl C. Trieloff <cctrieloff@apache.org>2007-11-12 15:38:56 +0000
commitb97a33ea99be4cb33e553cbf8d41c6445d0ed4a6 (patch)
treefac6a0121985a517bb796a2fd3bb702f1c0774dd /qpid/cpp/src
parentfd0c867a758caa471778cdfe2ffafeb1d1e1ce9b (diff)
downloadqpid-python-b97a33ea99be4cb33e553cbf8d41c6445d0ed4a6.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@594186 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/PersistableMessage.h5
-rw-r--r--qpid/cpp/src/qpid/broker/PersistableQueue.h4
-rw-r--r--qpid/cpp/src/qpid/broker/Queue.h6
3 files changed, 8 insertions, 7 deletions
diff --git a/qpid/cpp/src/qpid/broker/PersistableMessage.h b/qpid/cpp/src/qpid/broker/PersistableMessage.h
index a63ca2a52b..1a4ac6b891 100644
--- a/qpid/cpp/src/qpid/broker/PersistableMessage.h
+++ b/qpid/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/qpid/cpp/src/qpid/broker/PersistableQueue.h b/qpid/cpp/src/qpid/broker/PersistableQueue.h
index 2a352b3e9b..2d30513884 100644
--- a/qpid/cpp/src/qpid/broker/PersistableQueue.h
+++ b/qpid/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/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h
index 20eb7c0800..a1bbe275da 100644
--- a/qpid/cpp/src/qpid/broker/Queue.h
+++ b/qpid/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;