summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-06-18 17:53:30 +0000
committerAlan Conway <aconway@apache.org>2008-06-18 17:53:30 +0000
commit9bf82c2c8c45a5228643a285f8db0b1061a69ad9 (patch)
treed38be99fcb793712c2a2b5fb56dcbbb8294ff818 /cpp/src/qpid/cluster
parent02757b560356e0ddb090fbe103e0b65db6dbd3b3 (diff)
downloadqpid-python-9bf82c2c8c45a5228643a285f8db0b1061a69ad9.tar.gz
Bring cluster code up to date.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@669236 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster')
-rw-r--r--cpp/src/qpid/cluster/ClassifierHandler.cpp4
-rw-r--r--cpp/src/qpid/cluster/Cluster.cpp19
-rw-r--r--cpp/src/qpid/cluster/ClusterPlugin.cpp2
3 files changed, 10 insertions, 15 deletions
diff --git a/cpp/src/qpid/cluster/ClassifierHandler.cpp b/cpp/src/qpid/cluster/ClassifierHandler.cpp
index b241ee8e36..b78f795d20 100644
--- a/cpp/src/qpid/cluster/ClassifierHandler.cpp
+++ b/cpp/src/qpid/cluster/ClassifierHandler.cpp
@@ -41,11 +41,11 @@ struct ClassifierHandler::Visitor : public FrameDefaultVisitor {
using framing::FrameDefaultVisitor::visit;
using framing::FrameDefaultVisitor::defaultVisit;
- FrameHandler::Chain chosen;
+ FrameHandler* chosen;
AMQFrame& frame;
ClassifierHandler& classifier;
};
-void ClassifierHandler::handle(AMQFrame& f) { Visitor(f, *this).chosen(f); }
+void ClassifierHandler::handle(AMQFrame& f) { Visitor(f, *this).chosen->handle(f); }
}} // namespace qpid::cluster
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp
index 59353d7637..3007e9b1ab 100644
--- a/cpp/src/qpid/cluster/Cluster.cpp
+++ b/cpp/src/qpid/cluster/Cluster.cpp
@@ -71,28 +71,23 @@ struct ClusterDeliverHandler : public FrameHandler {
void handle(AMQFrame& f) {
next->handle(f);
- Mutex::ScopedLock l(senderLock);
- senderBusy=false;
- senderLock.notify();
+ // FIXME aconway 2008-06-16: solve overtaking problem - async completion of commands.
+ // Mutex::ScopedLock l(lock);
+ // senderBusy=false;
+ // senderLock.notify();
}
};
-// FIXME aconway 2008-01-29: IList
-void insert(FrameHandler::Chain& c, FrameHandler* h) {
- h->next = c.next;
- c.next = h;
-}
-
struct SessionObserver : public broker::SessionManager::Observer {
Cluster& cluster;
SessionObserver(Cluster& c) : cluster(c) {}
void opened(SessionState& s) {
- // FIXME aconway 2008-01-29: IList for memory management.
+ // FIXME aconway 2008-06-16: clean up chaining and observers.
ClusterSendHandler* sender=new ClusterSendHandler(s, cluster);
ClusterDeliverHandler* deliverer=new ClusterDeliverHandler(*sender, cluster);
- insert(s.in, deliverer);
- insert(s.in, sender);
+ s.getInChain().insert(deliverer);
+ s.getOutChain().insert(sender);
}
};
}
diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp
index 0ea3953175..ceafa389b0 100644
--- a/cpp/src/qpid/cluster/ClusterPlugin.cpp
+++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp
@@ -69,7 +69,7 @@ struct ClusterPlugin : public Plugin {
cluster = boost::in_place(options.name,
options.getUrl(broker->getPort()),
boost::ref(*broker));
- broker->getPreviewSessionManager().add(cluster->getObserver());
+ broker->getSessionManager().add(cluster->getObserver());
}
}
};