public ClientsResult calculateAllNodesResult(){
  final List<String> childNodePaths=getChildren(electionRootPath,false);
  _logger.info("Total peers = {} ",childNodePaths.size());
  Collections.sort(childNodePaths);
  int index=childNodePaths.indexOf(clientNodePath.substring(clientNodePath.lastIndexOf('/') + 1));
  return new ClientsResult(index,childNodePaths.size());
}

public ClientsResult calculateAllNodesResult ( ) { final List < String > childNodePaths = getChildren ( electionRootPath , false ) ; _logger . info ( "Total peers = {} " , childNodePaths . size ( ) ) ; Collections . sort ( childNodePaths ) ; int index = childNodePaths . indexOf ( clientNodePath . substring ( clientNodePath . lastIndexOf ( '/' ) + 1 ) ) ; return new ClientsResult ( index , childNodePaths . size ( ) ) ; }
gets node index and its peer count
