Package com.couchbase.client.core.util
Class ConnectionString
java.lang.Object
com.couchbase.client.core.util.ConnectionString
public class ConnectionString extends Object
Implements a
ConnectionString
.- Since:
- 2.4.0
- Author:
- Michael Nitschinger
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConnectionString.PortType
static class
ConnectionString.Scheme
static class
ConnectionString.UnresolvedSocket
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SCHEME
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConnectionString(String input)
-
Method Summary
Modifier and Type Method Description static ConnectionString
create(String input)
static ConnectionString
fromHostnames(List<String> hostnames)
List<ConnectionString.UnresolvedSocket>
hosts()
Get the list of all hosts from the connection string.boolean
isValidDnsSrv()
Returns true if this connection string qualifies for DNS SRV resolving per spec.String
original()
Returns the unmodified, original connection string.Map<String,String>
params()
ConnectionString.Scheme
scheme()
String
toString()
String
username()
-
Field Details
-
DEFAULT_SCHEME
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ConnectionString
-
-
Method Details
-
create
-
fromHostnames
-
scheme
-
username
-
hosts
Get the list of all hosts from the connection string.- Returns:
- hosts
-
params
-
isValidDnsSrv
public boolean isValidDnsSrv()Returns true if this connection string qualifies for DNS SRV resolving per spec.To be valid, the following criteria have to be met: only couchbase(s) schema, single host with no port specified and no IP address.
-
toString
-
original
Returns the unmodified, original connection string.
-