Class NodeIdentifier

java.lang.Object
com.couchbase.client.core.topology.NodeIdentifier

@Internal public class NodeIdentifier extends Object
  • Constructor Details

    • NodeIdentifier

      public NodeIdentifier(String canonicalHost, int canonicalPort, String hostForNetworkConnections)
      Creates an instance with a synthetic UUID derived from the canonical host and port.
    • NodeIdentifier

      public NodeIdentifier(String canonicalHost, int canonicalPort, String hostForNetworkConnections, @Nullable String uuid)
      Parameters:
      uuid - The node's UUID, or null to derive a synthetic UUID from the canonical host and port.
    • NodeIdentifier

      public NodeIdentifier(HostAndPort canonical, String hostForNetworkConnections, @Nullable String uuid)
      Parameters:
      uuid - The node's UUID, or null to derive a synthetic UUID from the canonical host and port.
  • Method Details

    • forBootstrap

      public static NodeIdentifier forBootstrap(String bootstrapHost, int bootstrapPort)
    • uuid

      public String uuid()
      Returns an opaque string that uniquely identifies this node within the cluster.
    • canonical

      public HostAndPort canonical()
      Returns manager host:port on the default network.

      The SDK should not attempt to connect to this address, because it might not be accessible on the client's network. If you're looking for an address to connect to, see hostForNetworkConnections.

    • toLegacy

      @Deprecated public NodeIdentifier toLegacy()
      Deprecated.
    • hostForNetworkConnections

      public String hostForNetworkConnections()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object