private String prepareConnectString(List<ZooKeeperNode> zknodes){
  StringBuffer buf=new StringBuffer();
  int count=1;
  for (  ZooKeeperNode node : zknodes) {
    buf.append(node.getHostname());
    buf.append(":");
    buf.append(node.getPort());
    if (count != zknodes.size()) {
      buf.append(",");
    }
    count++;
  }
  return buf.toString();
}

private String prepareConnectString ( List < ZooKeeperNode > zknodes ) { StringBuffer buf = new StringBuffer ( ) ; int count = 1 ; for ( ZooKeeperNode node : zknodes ) { buf . append ( node . getHostname ( ) ) ; buf . append ( ":" ) ; buf . append ( node . getPort ( ) ) ; if ( count != zknodes . size ( ) ) { buf . append ( "," ) ; } count ++ ; } return buf . toString ( ) ; }
meesageservice exposes single address / port combination . but this transport expects zookeeper servers to be deployed as ensemble ( group of servers for failure mgmt ) . so assumption is each zookeeper server port is in incremental order . based on the no . of servers configured in zookeepertransportconfig , port number would be increased and connections string will be formed . ex . addr1 : port1 , addr2 : port2 , addr3 : port3
