diff options
| author | Alan Conway <aconway@apache.org> | 2009-11-17 18:09:21 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-11-17 18:09:21 +0000 |
| commit | 8b58b19ec3989b676cd5a1584089040caee14289 (patch) | |
| tree | e0ca831f7fac0b26a4dcfa679b574e9a5dfafe06 /cpp/src/qpid/cluster/InitialStatusMap.h | |
| parent | ef7728a725272b88c3cd2f81f81ee60ed00cde90 (diff) | |
| download | qpid-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/InitialStatusMap.h')
| -rw-r--r-- | cpp/src/qpid/cluster/InitialStatusMap.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/cpp/src/qpid/cluster/InitialStatusMap.h b/cpp/src/qpid/cluster/InitialStatusMap.h index d139722623..4605a4c1fe 100644 --- a/cpp/src/qpid/cluster/InitialStatusMap.h +++ b/cpp/src/qpid/cluster/InitialStatusMap.h @@ -22,7 +22,7 @@ * */ -#include "types.h" +#include "MemberSet.h" #include <qpid/framing/ClusterInitialStatusBody.h> #include <boost/optional.hpp> @@ -48,10 +48,19 @@ class InitialStatusMap /**@return true if the map is complete. */ bool isComplete(); - /**@pre isComplete. @return this node's elders */ + /**@return true if the map was completed by the last config change or received. */ + bool transitionToComplete(); + /**@pre isComplete(). @return this node's elders */ MemberSet getElders(); - /**@pre isComplete. @return True if we need an update. */ + /**@pre isComplete(). @return True if we need an update. */ bool isUpdateNeeded(); + /**@pre isComplete(). @return Cluster-wide cluster ID. */ + framing::Uuid getClusterId(); + + /**@pre isComplete() && !isUpdateNeeded(). + *@return member->URL map for all members. + */ + std::map<MemberId, Url> getMemberUrls(); private: typedef std::map<MemberId, boost::optional<Status> > Map; @@ -61,7 +70,7 @@ class InitialStatusMap Map map; MemberSet firstConfig; MemberId self; - bool complete, updateNeeded, resendNeeded; + bool completed, resendNeeded; }; }} // namespace qpid::cluster |
