diff options
author | Alan Conway <aconway@apache.org> | 2008-09-18 13:55:30 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-09-18 13:55:30 +0000 |
commit | e2b079386b19c34a26bb4a7c67bd002ebb9bdc94 (patch) | |
tree | c190fa29f5a58530bba7f174ec6f5727c36630ba /cpp/src/qpid/cluster/Cluster.h | |
parent | fcc3335293a77c8e9130ea1836ee55872d6b28f5 (diff) | |
download | qpid-python-e2b079386b19c34a26bb4a7c67bd002ebb9bdc94.tar.gz |
Refactor Cluster logic into separate handlers for Joining & Member modes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@696657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Cluster.h')
-rw-r--r-- | cpp/src/qpid/cluster/Cluster.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.h b/cpp/src/qpid/cluster/Cluster.h index 847f179cc0..7c4e121a9b 100644 --- a/cpp/src/qpid/cluster/Cluster.h +++ b/cpp/src/qpid/cluster/Cluster.h @@ -23,11 +23,12 @@ #include "Event.h" #include "NoOpConnectionOutputHandler.h" #include "ClusterMap.h" +#include "JoiningHandler.h" +#include "MemberHandler.h" #include "qpid/broker/Broker.h" #include "qpid/sys/PollableQueue.h" #include "qpid/sys/Monitor.h" -#include "qpid/framing/AMQP_AllOperations.h" #include "qpid/Url.h" #include "qpid/management/Manageable.h" #include "qmf/org/apache/qpid/cluster/Cluster.h" @@ -78,7 +79,7 @@ class Cluster : private Cpg::Handler, public management::Manageable void leave(); // Cluster controls. - void update(const framing::FieldTable& members, uint64_t dumping); + void update(const MemberId&, const framing::FieldTable& members, uint64_t dumping); void dumpRequest(const MemberId&, const std::string& url); void ready(const MemberId&, const std::string& url); @@ -127,8 +128,6 @@ class Cluster : private Cpg::Handler, public management::Manageable /** Callback if CPG fd is disconnected. */ void disconnect(sys::DispatchHandle&); - void handleMethod(MemberId from, cluster::Connection* connection, framing::AMQMethodBody& method); - boost::intrusive_ptr<cluster::Connection> getConnection(const ConnectionId&); virtual qpid::management::ManagementObject* GetManagementObject(void) const; @@ -151,6 +150,14 @@ class Cluster : private Cpg::Handler, public management::Manageable EventQueue connectionEventQueue; State state; qmf::org::apache::qpid::cluster::Cluster* mgmtObject; // mgnt owns lifecycle + + // Handlers for different states. + ClusterHandler* handler; + JoiningHandler joiningHandler; + MemberHandler memberHandler; + + friend class JoiningHandler; + friend class MemberHandler; }; }} // namespace qpid::cluster |