Package com.couchbase.client.core.util
Class DnsSrv
- java.lang.Object
-
- com.couchbase.client.core.util.DnsSrv
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_DNS_SECURE_SERVICE
The default DNS prefix for encrypted connections.static String
DEFAULT_DNS_SERVICE
The default DNS prefix for not encrypted connections.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>
fromDnsSrv(String serviceName, boolean full, boolean secure)
Fetch a bootstrap list from DNS SRV using default OS name resolution.static List<String>
fromDnsSrv(String serviceName, boolean full, boolean secure, String nameServerIP)
Fetch a bootstrap list from DNS SRV using a specific nameserver IP.static void
setDnsEnvParameter(String key, String value)
-
-
-
Field Detail
-
DEFAULT_DNS_SERVICE
public static final String DEFAULT_DNS_SERVICE
The default DNS prefix for not encrypted connections.- See Also:
- Constant Field Values
-
DEFAULT_DNS_SECURE_SERVICE
public static final String DEFAULT_DNS_SECURE_SERVICE
The default DNS prefix for encrypted connections.- See Also:
- Constant Field Values
-
-
Method Detail
-
fromDnsSrv
public static List<String> fromDnsSrv(String serviceName, boolean full, boolean secure) throws NamingException
Fetch a bootstrap list from DNS SRV using default OS name resolution.- Parameters:
serviceName
- the DNS SRV locator.full
- if the service name is the full one or needs to be enriched by the couchbase prefixes.secure
- if the secure service prefix should be used.- Returns:
- a list of DNS SRV records.
- Throws:
NamingException
- if something goes wrong during the load process.
-
fromDnsSrv
public static List<String> fromDnsSrv(String serviceName, boolean full, boolean secure, String nameServerIP) throws NamingException
Fetch a bootstrap list from DNS SRV using a specific nameserver IP.- Parameters:
serviceName
- the DNS SRV locator.full
- if the service name is the full one or needs to be enriched by the couchbase prefixes.secure
- if the secure service prefix should be used.nameServerIP
- an IPv4 for the name server to use for SRV resolution.- Returns:
- a list of DNS SRV records.
- Throws:
NamingException
- if something goes wrong during the load process.
-
-