public class NodeInfo extends Object implements KetamaRingNode
| Constructor and Description |
|---|
NodeInfo(String hostname,
Map<ServiceType,Integer> direct,
Map<ServiceType,Integer> ssl,
HostAndPort ketamaAuthority)
Creates an instance from pre-parsed address info.
|
NodeInfo(String hostname,
Map<ServiceType,Integer> direct,
Map<ServiceType,Integer> ssl,
Map<String,AlternateAddress> alternateAddresses)
Creates a new
NodeInfo with SSL services. |
NodeInfo(String viewUri,
String hostname,
Map<String,Integer> ports,
Map<String,AlternateAddress> alternateAddresses)
Creates a new
NodeInfo with no SSL services. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,AlternateAddress> |
alternateAddresses() |
boolean |
equals(Object o) |
int |
hashCode() |
String |
hostname() |
NodeIdentifier |
identifier() |
HostAndPort |
ketamaAuthority()
Returns a node's host and non-TLS KV port from the "default" network.
|
Map<ServiceType,Integer> |
services() |
Map<ServiceType,Integer> |
sslServices() |
String |
toString() |
public NodeInfo(String viewUri, String hostname, Map<String,Integer> ports, Map<String,AlternateAddress> alternateAddresses)
NodeInfo with no SSL services.viewUri - the URI of the view service.hostname - the hostname of the node.ports - the port list of the node services.public NodeInfo(String hostname, Map<ServiceType,Integer> direct, Map<ServiceType,Integer> ssl, Map<String,AlternateAddress> alternateAddresses)
NodeInfo with SSL services.hostname - the hostname of the node.direct - the port list of the direct node services.ssl - the port list of the ssl node services.@Stability.Internal public NodeInfo(String hostname, Map<ServiceType,Integer> direct, Map<ServiceType,Integer> ssl, @Nullable HostAndPort ketamaAuthority)
@Nullable public HostAndPort ketamaAuthority()
KetamaRingNodeUsed 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.
ketamaAuthority in interface KetamaRingNodepublic String hostname()
public NodeIdentifier identifier()
public Map<ServiceType,Integer> services()
public Map<ServiceType,Integer> sslServices()
public Map<String,AlternateAddress> alternateAddresses()
Copyright © 2024 Couchbase, Inc.. All rights reserved.