public static String encodeAsString ( final ClusterMember [ ] clusterMembers ) { final StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 , length = clusterMembers . length ; i < length ; i ++ ) { final ClusterMember member = clusterMembers [ i ] ; builder . append ( member . id ( ) ) . append ( ' ' ) . append ( member . endpointsDetail ( ) ) ; if ( ( length - 1 ) != i ) { builder . append ( ' ' ) ; } } return builder . toString ( ) ; }
Encode member details from a cluster members array to a string .