Class HostAndServicePorts

java.lang.Object
com.couchbase.client.core.topology.HostAndServicePorts
All Implemented Interfaces:
KetamaRingNode

@Internal public class HostAndServicePorts extends Object implements KetamaRingNode
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

  • Constructor Details

  • Method Details

    • inaccessible

      public boolean inaccessible()
    • id

      public NodeIdentifier id()
    • host

      public String host()
    • ketamaAuthority

      public @Nullable 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.

      Specified by:
      ketamaAuthority in interface KetamaRingNode
    • port

      public OptionalInt port(ServiceType serviceType)
    • ports

      public Map<ServiceType,Integer> ports()
    • serverGroup

      public @Nullable String serverGroup()
      Returns the name of the server group this node belongs to, or null if Couchbase Server version is less than 7.6.2.
    • appTelemetryPath

      public @Nullable String appTelemetryPath()
      Returns the HTTP path that accepts application telemetry WebSocket connections (on management service part), or null if this node does not currently accept application telemetry connections.
    • uuid

      public @Nullable String uuid()
      Returns this node's UUID, or null if the Couchbase Server version is less than 8.0.0.
    • has

      public boolean has(ServiceType serviceType)
    • without

      @Internal public HostAndServicePorts without(ServiceType service, ServiceType... moreServices)
    • withKetamaAuthority

      @Internal public HostAndServicePorts withKetamaAuthority(@Nullable HostAndPort ketamaAuthority)
    • 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