From d7ce27f7cc96894f149e5c20c03b306b80636727 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 22 Jan 2009 22:53:50 +0000 Subject: QPID-1567: More changes to make clustering and federation work together * replicate outgoing link traffic to all nodes * coordinate amongst nodes so that only one node actually maintains active links with the others able to take over if that node fails git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@736841 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/ConnectionCodec.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cpp/src/qpid/cluster/ConnectionCodec.cpp') diff --git a/cpp/src/qpid/cluster/ConnectionCodec.cpp b/cpp/src/qpid/cluster/ConnectionCodec.cpp index 44e40f0591..28d2750ff9 100644 --- a/cpp/src/qpid/cluster/ConnectionCodec.cpp +++ b/cpp/src/qpid/cluster/ConnectionCodec.cpp @@ -38,21 +38,22 @@ using namespace framing; sys::ConnectionCodec* ConnectionCodec::Factory::create(ProtocolVersion v, sys::OutputControl& out, const std::string& id) { if (v == ProtocolVersion(0, 10)) - return new ConnectionCodec(out, id, cluster, false); + return new ConnectionCodec(out, id, cluster, false, false); else if (v == ProtocolVersion(0x80 + 0, 0x80 + 10)) - return new ConnectionCodec(out, id, cluster, true); // Catch-up connection + return new ConnectionCodec(out, id, cluster, true, false); // Catch-up connection return 0; } // Used for outgoing Link connections, we don't care. sys::ConnectionCodec* ConnectionCodec::Factory::create(sys::OutputControl& out, const std::string& id) { - return next->create(out, id); + return new ConnectionCodec(out, id, cluster, false, true); + //return next->create(out, id); } -ConnectionCodec::ConnectionCodec(sys::OutputControl& out, const std::string& id, Cluster& cluster, bool catchUp) - : codec(out, id, false), - interceptor(new Connection(cluster, codec, id, cluster.getId(), catchUp)), +ConnectionCodec::ConnectionCodec(sys::OutputControl& out, const std::string& id, Cluster& cluster, bool catchUp, bool isLink) + : codec(out, id, isLink), + interceptor(new Connection(cluster, codec, id, cluster.getId(), catchUp, isLink)), id(interceptor->getId()), localId(id) { -- cgit v1.2.1