summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/ClusterMap.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-11-17 18:09:21 +0000
committerAlan Conway <aconway@apache.org>2009-11-17 18:09:21 +0000
commit8b58b19ec3989b676cd5a1584089040caee14289 (patch)
treee0ca831f7fac0b26a4dcfa679b574e9a5dfafe06 /cpp/src/qpid/cluster/ClusterMap.h
parentef7728a725272b88c3cd2f81f81ee60ed00cde90 (diff)
downloadqpid-python-8b58b19ec3989b676cd5a1584089040caee14289.tar.gz
Integrated InitialStatusMap into cluster code.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@881423 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ClusterMap.h')
-rw-r--r--cpp/src/qpid/cluster/ClusterMap.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/cpp/src/qpid/cluster/ClusterMap.h b/cpp/src/qpid/cluster/ClusterMap.h
index 2e682a6f4a..98572813a8 100644
--- a/cpp/src/qpid/cluster/ClusterMap.h
+++ b/cpp/src/qpid/cluster/ClusterMap.h
@@ -22,7 +22,7 @@
*
*/
-#include "qpid/cluster/types.h"
+#include "MemberSet.h"
#include "qpid/Url.h"
#include "qpid/framing/ClusterConnectionMembershipBody.h"
#include "qpid/framing/SequenceNumber.h"
@@ -47,16 +47,14 @@ class ClusterMap {
typedef std::map<MemberId, Url> Map;
typedef std::set<MemberId> Set;
- static Set decode(const std::string&);
-
ClusterMap();
- ClusterMap(const MemberId& id, const Url& url, bool isReady);
+ ClusterMap(const Map& map);
ClusterMap(const framing::FieldTable& joiners, const framing::FieldTable& members, framing::SequenceNumber frameSeq);
/** Update from config change.
*@return true if member set changed.
*/
- bool configChange(const std::string& addresses);
+ bool configChange(const Set& members);
bool isJoiner(const MemberId& id) const { return joiners.find(id) != joiners.end(); }
bool isMember(const MemberId& id) const { return members.find(id) != members.end(); }
@@ -85,11 +83,6 @@ class ClusterMap {
/**@return true If this is a new member */
bool ready(const MemberId& id, const Url&);
- /**
- * Utility method to return intersection of two member sets
- */
- static Set intersection(const Set& a, const Set& b);
-
framing::SequenceNumber getFrameSeq() { return frameSeq; }
framing::SequenceNumber incrementFrameSeq() { return ++frameSeq; }