Class NodeInfo

java.lang.Object
com.couchbase.client.dcp.core.config.NodeInfo

public class NodeInfo extends Object
Used for locating the services running on a node.

Consists of a host (hostname or IP literal) and a map from service to port number.

The ports are either all TLS ports, or all non-TLS ports, depending on the PortSelector used by the config parser.

  • Field Details

    • INACCESSIBLE

      public static final NodeInfo INACCESSIBLE
  • Constructor Details

    • NodeInfo

      public NodeInfo(String host, Map<com.couchbase.client.core.service.ServiceType,Integer> ports, @Nullable com.couchbase.client.core.util.HostAndPort ketamaAuthority)
  • Method Details

    • inaccessible

      public boolean inaccessible()
    • id

      public NodeIdentifier id()
    • host

      public String host()
    • ketamaAuthority

      @Nullable public com.couchbase.client.core.util.HostAndPort ketamaAuthority()
      Returns the host and non-TLS KV port from the "default" network.

      Used with Memcached buckets to determine which document IDs this node is responsible for.

      If the node has no non-TLS KV port, then this method returns null, and the node cannot participate in a ketama ring.

    • port

      public OptionalInt port(com.couchbase.client.core.service.ServiceType serviceType)
    • ports

      public Map<com.couchbase.client.core.service.ServiceType,Integer> ports()
    • has

      public boolean has(com.couchbase.client.core.service.ServiceType serviceType)
    • matches

      public boolean matches(com.couchbase.client.core.env.SeedNode seedNode)
    • 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
    • hostname

      @Deprecated public String hostname()
      Deprecated.
      Please use host() instead.
    • services

      @Deprecated public Map<com.couchbase.client.core.service.ServiceType,Integer> services()
      Deprecated.
      Please use ports() instead.
    • sslServices

      @Deprecated public Map<com.couchbase.client.core.service.ServiceType,Integer> sslServices()
      Deprecated.
      Please use ports() instead.