summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Connection.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-11-12 17:15:20 +0000
committerAlan Conway <aconway@apache.org>2008-11-12 17:15:20 +0000
commitc99d4d45ead8020517838b99e2106887701b17d7 (patch)
tree66559a3df444de8a4cb52ffbead0123dd2325d69 /cpp/src/qpid/cluster/Connection.cpp
parent1a18c1798833e7201177e786afa0d05412c4f53b (diff)
downloadqpid-python-c99d4d45ead8020517838b99e2106887701b17d7.tar.gz
Cluster replicates queues/exchanges with same encode/decode functions as the store.
Removed un-necessary heap allocation in QPID_LOG statements. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@713425 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.cpp')
-rw-r--r--cpp/src/qpid/cluster/Connection.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp
index 9c0b371066..1276a994ac 100644
--- a/cpp/src/qpid/cluster/Connection.cpp
+++ b/cpp/src/qpid/cluster/Connection.cpp
@@ -29,6 +29,8 @@
#include "qpid/broker/TxAccept.h"
#include "qpid/broker/RecoveredEnqueue.h"
#include "qpid/broker/RecoveredDequeue.h"
+#include "qpid/broker/Exchange.h"
+#include "qpid/broker/Queue.h"
#include "qpid/framing/enum.h"
#include "qpid/framing/AMQFrame.h"
#include "qpid/framing/AllInvoker.h"
@@ -347,6 +349,17 @@ void Connection::accumulatedAck(const qpid::framing::SequenceSet& s) {
semanticState().setAccumulatedAck(s);
}
+void Connection::exchange(const std::string& encoded) {
+ Buffer buf(const_cast<char*>(encoded.data()), encoded.size());
+ broker::Exchange::shared_ptr ex = broker::Exchange::decode(cluster.getBroker().getExchanges(), buf);
+ QPID_LOG(debug, cluster << " decoded exchange " << ex->getName());
+}
+
+void Connection::queue(const std::string& encoded) {
+ Buffer buf(const_cast<char*>(encoded.data()), encoded.size());
+ broker::Queue::shared_ptr q = broker::Queue::decode(cluster.getBroker().getQueues(), buf);
+ QPID_LOG(debug, cluster << " decoded queue " << q->getName());
+}
}} // namespace qpid::cluster