public @NotNull String marshal() {
    StringBuilder sb = new StringBuilder();
    sb.append(host.getHostAddress());
    if (!bindAddress.isEmpty()) {
      if (bindAddress.contains(":")) {
        sb.append('@');
      } else {
        sb.append(':');
      }
      sb.append(bindAddress);
    }
    sb.append('[').append(port).append(']');
    return sb.toString();
  }
Returns marshaled string that is compatible as input for unmarshal.

@see #unmarshal(String)
@see #unmarshal(String, String)
geode-core/src/main/java/org/apache/geode/internal/admin/remote/DistributionLocatorId.java