Class HostAndServicePorts
java.lang.Object
com.couchbase.client.core.topology.HostAndServicePorts
- All Implemented Interfaces:
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 Summary
-
Constructor Summary
ConstructorDescriptionHostAndServicePorts
(String host, Map<ServiceType, Integer> ports, NodeIdentifier id, HostAndPort ketamaAuthority) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
has
(ServiceType serviceType) int
hashCode()
host()
id()
boolean
Returns the host and non-TLS KV port from the "default" network.port
(ServiceType serviceType) ports()
toString()
withKetamaAuthority
(HostAndPort ketamaAuthority) without
(ServiceType service, ServiceType... moreServices)
-
Field Details
-
INACCESSIBLE
-
-
Constructor Details
-
HostAndServicePorts
public HostAndServicePorts(String host, Map<ServiceType, Integer> ports, NodeIdentifier id, @Nullable HostAndPort ketamaAuthority)
-
-
Method Details
-
inaccessible
public boolean inaccessible() -
id
-
host
-
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 interfaceKetamaRingNode
-
port
-
ports
-
has
-
without
-
withKetamaAuthority
-
equals
-
hashCode
public int hashCode() -
toString
-