Class DefaultNodeInfo
java.lang.Object
com.couchbase.client.dcp.core.config.DefaultNodeInfo
- All Implemented Interfaces:
NodeInfo
Default implementation of
NodeInfo.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultNodeInfo(String viewUri, String hostname, Map<String, Integer> ports, Map<String, AlternateAddress> alternateAddresses) Creates a newDefaultNodeInfowith no SSL services.DefaultNodeInfo(String hostname, Map<ServiceType, Integer> direct, Map<ServiceType, Integer> ssl, Map<String, AlternateAddress> alternateAddresses) Creates a newDefaultNodeInfowith SSL services. -
Method Summary
Modifier and TypeMethodDescriptionContains alternate addresses, if set.hostname()The inet address of the node.services()The exposed non-ssl services.The exposed ssl services.toString()True if alternate addresses should be used, false otherwise.voiduseAlternateNetwork(String useAlternateNetwork) Setter to set if external networking should be used or not.
-
Constructor Details
-
DefaultNodeInfo
public DefaultNodeInfo(String viewUri, String hostname, Map<String, Integer> ports, Map<String, AlternateAddress> alternateAddresses) Creates a newDefaultNodeInfowith 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 newDefaultNodeInfowith 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 Details
-
hostname
Description copied from interface:NodeInfoThe inet address of the node. -
services
Description copied from interface:NodeInfoThe exposed non-ssl services. -
sslServices
Description copied from interface:NodeInfoThe exposed ssl services.- Specified by:
sslServicesin interfaceNodeInfo- Returns:
- a map containing all services with secured ports.
-
alternateAddresses
Description copied from interface:NodeInfoContains alternate addresses, if set.- Specified by:
alternateAddressesin interfaceNodeInfo- Returns:
- a map containing alternate addresses.
-
useAlternateNetwork
Description copied from interface:NodeInfoTrue if alternate addresses should be used, false otherwise.- Specified by:
useAlternateNetworkin interfaceNodeInfo
-
useAlternateNetwork
Description copied from interface:NodeInfoSetter to set if external networking should be used or not.- Specified by:
useAlternateNetworkin interfaceNodeInfo- Parameters:
useAlternateNetwork- if not null will be used.
-
toString
-