summaryrefslogtreecommitdiff
path: root/node/Topology.hpp
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-10-26 18:10:27 -0700
committerGrant Limberg <glimberg@gmail.com>2015-10-26 18:10:27 -0700
commit352b83252fb2617a15cde0927cc30110b729e46d (patch)
tree38569e4f6c1c162cdaabf7ac8c9d6b7917d71ffd /node/Topology.hpp
parenta0c3083af0821db0303c62dfae9ebc560c3c147a (diff)
parent6625d7929654803f99b7a69f56a400046314acac (diff)
downloadinfinitytier-352b83252fb2617a15cde0927cc30110b729e46d.tar.gz
infinitytier-352b83252fb2617a15cde0927cc30110b729e46d.zip
Merge branch 'adamierymenko-dev' into windows-ui
Diffstat (limited to 'node/Topology.hpp')
-rw-r--r--node/Topology.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/node/Topology.hpp b/node/Topology.hpp
index 48e264a8..ee9827b9 100644
--- a/node/Topology.hpp
+++ b/node/Topology.hpp
@@ -193,6 +193,11 @@ public:
void clean(uint64_t now);
/**
+ * @return Number of 'alive' peers
+ */
+ unsigned long countAlive() const;
+
+ /**
* Apply a function or function object to all peers
*
* Note: explicitly template this by reference if you want the object
@@ -225,6 +230,11 @@ public:
return _peers.entries();
}
+ /**
+ * @return True if I am a root server in the current World
+ */
+ inline bool amRoot() const throw() { return _amRoot; }
+
private:
Identity _getIdentity(const Address &zta);
void _setWorld(const World &newWorld);