public List<String> getClusterNodes() { try { InitialContext ctx = new InitialContext(); String jndiName = "/HAPartition/" + this.partitionName; HAPartition partition = (HAPartition) ctx.lookup(jndiName); return partition.getCurrentView(); } catch (Exception e) { this.log.error("Failed to access HAPartition state", e); return null; } }
List<String> allNodes = this.partition.getCurrentView(); for (String node: allNodes)