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 classConnectionString.PortTypestatic classConnectionString.Schemestatic classConnectionString.UnresolvedSocket -
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_SCHEME -
Constructor Summary
Constructors Modifier Constructor Description protectedConnectionString(String input) -
Method Summary
Modifier and Type Method Description static ConnectionStringcreate(String input)static ConnectionStringfromHostnames(List<String> hostnames)List<ConnectionString.UnresolvedSocket>hosts()Get the list of all hosts from the connection string.booleanisValidDnsSrv()Returns true if this connection string qualifies for DNS SRV resolving per spec.Stringoriginal()Returns the unmodified, original connection string.Map<String,String>params()ConnectionString.Schemescheme()StringtoString()Stringusername()
-
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.
-