Class NodeIdentifier

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

public class NodeIdentifier extends Object
Uniquely identifies a node within the cluster, using the node's host and manager port from the default network.
  • Constructor Details

    • NodeIdentifier

      @Deprecated public NodeIdentifier(String canonicalHost, int canonicalManagerPort)
      Deprecated.
    • NodeIdentifier

      public NodeIdentifier(HostAndPort canonicalAddress, String hostForNetworkConnections)
  • Method Details

    • forBootstrap

      @Internal public static NodeIdentifier forBootstrap(String bootstrapHost, int bootstrapPort)
    • hostForNetworkConnections

      public String hostForNetworkConnections() throws NoSuchElementException
      Returns this node's host on the selected network.

      If the default network was selected, this is the same as the canonical host.

      Throws:
      NoSuchElementException - if this info is not available
    • address

      public String address()
      Returns the node's host on the default network.
    • managerPort

      public int managerPort()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object