Package com.couchbase.client.core.util
Class DnsSrv
java.lang.Object
com.couchbase.client.core.util.DnsSrv
The default implementation for performing DNS SRV lookups.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromDnsSrv
(String serviceName, boolean full, boolean secure) Fetch a bootstrap list from DNS SRV using default OS name resolution.
-
Field Details
-
DEFAULT_DNS_SERVICE
The default DNS prefix for not encrypted connections.- See Also:
-
DEFAULT_DNS_SECURE_SERVICE
The default DNS prefix for encrypted connections.- See Also:
-
-
Method Details
-
fromDnsSrv
public static List<String> fromDnsSrv(String serviceName, boolean full, boolean secure) throws NameNotFoundException 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:
NameNotFoundException
- if there's no SRV record associated with serviceName
-