aeron-cluster/src/main/java/io/aeron/cluster/ClusterMember.java
public static ClusterMember[] parse(final String value)
    {
        if (null == value || value.length() == 0)
        {
            return ClusterMember.EMPTY_CLUSTER_MEMBER_ARRAY;
        }

        final String[] memberValues = value.split("\\|");
        final int length = memberValues.length;
        final ClusterMember[] members = new ClusterMember[length];

        for (int i = 0; i < length; i++)
        {
            final String endpointsDetail = memberValues[i];
            final String[] memberAttributes = endpointsDetail.split(",");
            if (memberAttributes.length != 6)
            {
                throw new ClusterException("invalid member value: " + endpointsDetail + " within: " + value);
            }

            final String justEndpoints = String.join(
                ",",
                memberAttributes[1],
                memberAttributes[2],
                memberAttributes[3],
                memberAttributes[4],
                memberAttributes[5]);

            members[i] = new ClusterMember(
                Integer.parseInt(memberAttributes[0]),
                memberAttributes[1],
                memberAttributes[2],
                memberAttributes[3],
                memberAttributes[4],
                memberAttributes[5],
                justEndpoints);
        }

        return members;
    }
public static ClusterMember[] parse(final String value)
    {
        if (null == value || value.length() == 0)
        {
            return ClusterMember.EMPTY_CLUSTER_MEMBER_ARRAY;
        }

        final String[] memberValues = value.split("\\|");
        final int length = memberValues.length;
        final ClusterMember[] members = new ClusterMember[length];

        for (int i = 0; i < length; i++)
        {
            final String endpointsDetail = memberValues[i];
            final String[] memberAttributes = endpointsDetail.split(",");
            if (memberAttributes.length != 6)
            {
                throw new ClusterException("invalid member value: " + endpointsDetail + " within: " + value);
            }

            final String justEndpoints = String.join(
                ",",
                memberAttributes[1],
                memberAttributes[2],
                memberAttributes[3],
                memberAttributes[4],
                memberAttributes[5]);

            members[i] = new ClusterMember(
                Integer.parseInt(memberAttributes[0]),
                memberAttributes[1],
                memberAttributes[2],
                memberAttributes[3],
                memberAttributes[4],
                memberAttributes[5],
                justEndpoints);
        }

        return members;
    }
public static ClusterMember [ ] parse ( final String value ) { if ( null == value || value . length ( ) == 0 ) { return ClusterMember . EMPTY_CLUSTER_MEMBER_ARRAY ; } final String [ ] memberValues = value . split ( "\\|" ) ; final int length = memberValues . length ; final ClusterMember [ ] members = new ClusterMember [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { final String endpointsDetail = memberValues [ i ] ; final String [ ] memberAttributes = endpointsDetail . split ( "," ) ; if ( memberAttributes . length != 6 ) { throw new ClusterException ( "invalid member value: " + endpointsDetail + " within: " + value ) ; } final String justEndpoints = String . join ( "," , memberAttributes [ 1 ] , memberAttributes [ 2 ] , memberAttributes [ 3 ] , memberAttributes [ 4 ] , memberAttributes [ 5 ] ) ; members [ i ] = new ClusterMember ( Integer . parseInt ( memberAttributes [ 0 ] ) , memberAttributes [ 1 ] , memberAttributes [ 2 ] , memberAttributes [ 3 ] , memberAttributes [ 4 ] , memberAttributes [ 5 ] , justEndpoints ) ; } return members ; }
Parse the details for a cluster members from a string.
<p>
<code>
member-id,client-facing:port,member-facing:port,log:port,transfer:port,archive:port|1,...
</code>

@param value of the string to be parsed.
@return An array of cluster members.
Parse the details for a cluster members from a string . <p > <code > member - id client - facing : port member - facing : port log : port transfer : port archive : port|1 ... < / code >