Package com.couchbase.client.core.util
Class ConnectionString
java.lang.Object
com.couchbase.client.core.util.ConnectionString
Implements a
ConnectionString
.- Since:
- 2.4.0
- Author:
- Michael Nitschinger
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionString
If this connection string consists of a single hostname (not IP address) with no port, returns that hostname.static ConnectionString
fromHostnames
(List<String> hostnames) hosts()
boolean
Returns true if this connection string consists of a single hostname (not IP address) with no port.original()
Returns this connection string formatted as a string.params()
scheme()
toString()
username()
withParams
(Map<String, String> params) withScheme
(ConnectionString.Scheme scheme)
-
Field Details
-
DEFAULT_SCHEME
- See Also:
-
-
Constructor Details
-
ConnectionString
-
-
Method Details
-
create
-
fromHostnames
-
withScheme
-
withParams
-
scheme
-
username
-
hosts
-
params
-
isValidDnsSrv
public boolean isValidDnsSrv()Returns true if this connection string consists of a single hostname (not IP address) with no port. -
dnsSrvCandidate
If this connection string consists of a single hostname (not IP address) with no port, returns that hostname. Otherwise, returns empty. -
toString
-
original
Returns this connection string formatted as a string.The result can be passed to
create(String)
to get the same connection string back again.
-