/** 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()); } }
/** @return The total number of configured hosts. */ public int getTotalNodeCount() { return hostsReader.getHosts().size(); }