summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Cluster.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-06 00:34:58 +0000
committerAlan Conway <aconway@apache.org>2008-09-06 00:34:58 +0000
commit3bb7782cb0904f0abf61b7fb28da7bce905ceb08 (patch)
treefcd641905882a5a5bc7a3f6fa8f621b9f15154ce /cpp/src/qpid/cluster/Cluster.h
parentdf334f0768c628f2fed8dd350c135d914c54b918 (diff)
downloadqpid-python-3bb7782cb0904f0abf61b7fb28da7bce905ceb08.tar.gz
Queue cpg deliveries for execution in separate thread.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@692595 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Cluster.h')
-rw-r--r--cpp/src/qpid/cluster/Cluster.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.h b/cpp/src/qpid/cluster/Cluster.h
index 630de97093..7d3ef13b14 100644
--- a/cpp/src/qpid/cluster/Cluster.h
+++ b/cpp/src/qpid/cluster/Cluster.h
@@ -20,6 +20,7 @@
*/
#include "qpid/cluster/Cpg.h"
+#include "qpid/cluster/Event.h"
#include "qpid/cluster/PollableQueue.h"
#include "qpid/cluster/NoOpConnectionOutputHandler.h"
@@ -85,7 +86,7 @@ class Cluster : public RefCounted, private Cpg::Handler
/** Message sent over the cluster. */
typedef std::pair<framing::AMQFrame, ConnectionId> Message;
- typedef PollableQueue<Message> MessageQueue;
+ typedef PollableQueue<Event> EventQueue;
boost::function<void()> shutdownNext;
@@ -93,6 +94,8 @@ class Cluster : public RefCounted, private Cpg::Handler
void deliverFrame(framing::AMQFrame&, const ConnectionId&);
void deliverBuffer(const char*, size_t, const ConnectionId&);
+
+ void deliverEvent(const Event&);
/** CPG deliver callback. */
void deliver(
@@ -132,7 +135,8 @@ class Cluster : public RefCounted, private Cpg::Handler
ConnectionMap connections;
NoOpConnectionOutputHandler shadowOut;
sys::DispatchHandle cpgDispatchHandle;
-
+ PollableQueue<Event> deliverQueue;
+
friend std::ostream& operator <<(std::ostream&, const Cluster&);
friend std::ostream& operator <<(std::ostream&, const UrlMap::value_type&);
friend std::ostream& operator <<(std::ostream&, const UrlMap&);