public static @NotNull DistributionLocatorId unmarshal(final @NotNull String marshalled,
      final @Nullable String memberName) {

    final int portStartIndex = marshalled.indexOf('[');
    final int portEndIndex = marshalled.indexOf(']');

    if (portStartIndex < 0 || portEndIndex < portStartIndex) {
      throw new IllegalArgumentException(
          format("%s is not in the form hostname[port].", marshalled));
    }

    int bindAddressIndex = marshalled.lastIndexOf('@');
    if (bindAddressIndex < 0) {
      bindAddressIndex = marshalled.lastIndexOf(':');
    }

    String hostname =
        marshalled.substring(0, bindAddressIndex > -1 ? bindAddressIndex : portStartIndex);

    if (hostname.indexOf(':') >= 0) {
      bindAddressIndex = marshalled.lastIndexOf('@');
      hostname = marshalled.substring(0, bindAddressIndex > -1 ? bindAddressIndex : portStartIndex);
    }

    InetAddress host = getInetAddressOrNull(hostname);

    final int port;
    try {
      port = Integer.parseInt(marshalled.substring(portStartIndex + 1, portEndIndex));
    } catch (NumberFormatException nfe) {
      throw new IllegalArgumentException(
          format("%s does not contain a valid port number", marshalled));
    }

    final String bindAddress =
        substringAfterFoundOrNull(marshalled, bindAddressIndex, portStartIndex);
    final String hostnameForClients = parseHostnameForClients(marshalled);

    return new DistributionLocatorId(host, hostname, port, bindAddress, null, hostnameForClients,
        memberName);
  }
Constructs a DistributionLocatorId with a String of the form: hostname[port] or
hostname:bindaddress[port] or hostname@bindaddress[port]
and memberName
<p>
The :bindaddress portion is optional. hostname[port] is the more common form.
<p>
Example: merry.gemstone.com[7056]<br>
Example w/ bind address: merry.gemstone.com:81.240.0.1[7056], or
merry.gemstone.com@fdf0:76cf:a0ed:9449::16[7056]
<p>
Use bindaddress[port] or hostname[port]. This object doesn't need to differentiate between the
two.
<p>
memberName example: locator1 or locator-ny1.
<p>
geode-core/src/main/java/org/apache/geode/internal/admin/remote/DistributionLocatorId.java