Пример #1
0
 /** Update metrics for alive/dead nodes. */
 private void setAliveDeadMetrics() {
   clusterManager.getMetrics().setAliveNodes(nameToNode.size());
   int totalHosts = hostsReader.getHosts().size();
   if (totalHosts > 0) {
     clusterManager.getMetrics().setDeadNodes(totalHosts - nameToNode.size());
   }
 }
Пример #2
0
 /** @return The total number of configured hosts. */
 public int getTotalNodeCount() {
   return hostsReader.getHosts().size();
 }