summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/ConnectionCodec.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-03-02 23:30:08 +0000
committerAlan Conway <aconway@apache.org>2009-03-02 23:30:08 +0000
commita179ded965c5cc70a0666d07737c38c67c1558c1 (patch)
tree9c854273164ee106eaa611dd68870d818abfc2c1 /cpp/src/qpid/cluster/ConnectionCodec.cpp
parente669e97c7f1c034841986e18288af7629d356aa2 (diff)
downloadqpid-python-a179ded965c5cc70a0666d07737c38c67c1558c1.tar.gz
Replicate connection decoder fragments to new members.
Refactoring: - Merge Decoder into ConnectionMap. - Process cluster controls in event queue thread. - Use counter not pointer for connection ID, avoid re-use. - Do all processing in event queue thread to avoid races (temporary pending performance measurements) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@749473 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ConnectionCodec.cpp')
-rw-r--r--cpp/src/qpid/cluster/ConnectionCodec.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/cpp/src/qpid/cluster/ConnectionCodec.cpp b/cpp/src/qpid/cluster/ConnectionCodec.cpp
index 442ac1438f..1ddd64d3d6 100644
--- a/cpp/src/qpid/cluster/ConnectionCodec.cpp
+++ b/cpp/src/qpid/cluster/ConnectionCodec.cpp
@@ -46,16 +46,13 @@ ConnectionCodec::Factory::create(ProtocolVersion v, sys::OutputControl& out, con
// Used for outgoing Link connections, we don't care.
sys::ConnectionCodec*
-ConnectionCodec::Factory::create(sys::OutputControl& out, const std::string& id) {
- return new ConnectionCodec(out, id, cluster, false, true);
- //return next->create(out, id);
+ConnectionCodec::Factory::create(sys::OutputControl& out, const std::string& logId) {
+ return new ConnectionCodec(out, logId, cluster, false, true);
}
-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)
+ConnectionCodec::ConnectionCodec(sys::OutputControl& out, const std::string& logId, Cluster& cluster, bool catchUp, bool isLink)
+ : codec(out, logId, isLink),
+ interceptor(new Connection(cluster, codec, logId, cluster.getId(), catchUp, isLink))
{
std::auto_ptr<sys::ConnectionInputHandler> ih(new ProxyInputHandler(interceptor));
codec.setInputHandler(ih);