Package com.couchbase.client.core.config
Class DefaultNodeInfo
- java.lang.Object
-
- com.couchbase.client.core.config.DefaultNodeInfo
-
-
Constructor Summary
Constructors Constructor Description DefaultNodeInfo(String viewUri, String hostname, Map<String,Integer> ports, Map<String,AlternateAddress> alternateAddresses)
Creates a newDefaultNodeInfo
with no SSL services.DefaultNodeInfo(String hostname, Map<ServiceType,Integer> direct, Map<ServiceType,Integer> ssl, Map<String,AlternateAddress> alternateAddresses)
Creates a newDefaultNodeInfo
with SSL services.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,AlternateAddress>
alternateAddresses()
Contains alternate addresses, if set.String
hostname()
The inet address of the node.Map<ServiceType,Integer>
services()
The exposed non-ssl services.Map<ServiceType,Integer>
sslServices()
The exposed ssl services.String
toString()
String
useAlternateNetwork()
True if alternate addresses should be used, false otherwise.void
useAlternateNetwork(String useAlternateNetwork)
Setter to set if external networking should be used or not.
-
-
-
Constructor Detail
-
DefaultNodeInfo
public DefaultNodeInfo(String viewUri, String hostname, Map<String,Integer> ports, Map<String,AlternateAddress> alternateAddresses)
Creates a newDefaultNodeInfo
with no SSL services.- Parameters:
viewUri
- the URI of the view service.hostname
- the hostname of the node.ports
- the port list of the node services.
-
DefaultNodeInfo
public DefaultNodeInfo(String hostname, Map<ServiceType,Integer> direct, Map<ServiceType,Integer> ssl, Map<String,AlternateAddress> alternateAddresses)
Creates a newDefaultNodeInfo
with SSL services.- Parameters:
hostname
- the hostname of the node.direct
- the port list of the direct node services.ssl
- the port list of the ssl node services.
-
-
Method Detail
-
hostname
public String hostname()
Description copied from interface:NodeInfo
The inet address of the node.
-
services
public Map<ServiceType,Integer> services()
Description copied from interface:NodeInfo
The exposed non-ssl services.
-
sslServices
public Map<ServiceType,Integer> sslServices()
Description copied from interface:NodeInfo
The exposed ssl services.- Specified by:
sslServices
in interfaceNodeInfo
- Returns:
- a map containing all services with secured ports.
-
alternateAddresses
public Map<String,AlternateAddress> alternateAddresses()
Description copied from interface:NodeInfo
Contains alternate addresses, if set.- Specified by:
alternateAddresses
in interfaceNodeInfo
- Returns:
- a map containing alternate addresses.
-
useAlternateNetwork
public String useAlternateNetwork()
Description copied from interface:NodeInfo
True if alternate addresses should be used, false otherwise.- Specified by:
useAlternateNetwork
in interfaceNodeInfo
-
useAlternateNetwork
public void useAlternateNetwork(String useAlternateNetwork)
Description copied from interface:NodeInfo
Setter to set if external networking should be used or not.- Specified by:
useAlternateNetwork
in interfaceNodeInfo
- Parameters:
useAlternateNetwork
- if not null will be used.
-
-