Package com.couchbase.client.core.util
Class ConnectionStringUtil
java.lang.Object
com.couchbase.client.core.util.ConnectionStringUtil
Contains various helper methods when dealing with the connection string.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asConnectionString
(Collection<SeedNode> nodes) Returns a synthetic connection string corresponding to the seed nodes.static void
checkConnectionString
(CoreEnvironment env, boolean ownsEnvironment, ConnectionString connStr) static boolean
isCapella
(ConnectionString connectionString) Returns true if the addresses indicate this is a Couchbase Capella cluster.seedNodesFromConnectionString
(String cs, boolean dnsSrvEnabled, boolean tlsEnabled, EventBus eventBus) Populates a list of seed nodes from the connection string.
-
Method Details
-
seedNodesFromConnectionString
public static Set<SeedNode> seedNodesFromConnectionString(String cs, boolean dnsSrvEnabled, boolean tlsEnabled, EventBus eventBus) Populates a list of seed nodes from the connection string.Note that this method also performs DNS SRV lookups if the connection string qualifies!
- Parameters:
cs
- the connection string in its encoded form.dnsSrvEnabled
- true if dns srv is enabled.tlsEnabled
- true if tls is enabled.- Returns:
- a set of seed nodes populated.
-
isCapella
Returns true if the addresses indicate this is a Couchbase Capella cluster. -
asConnectionString
Returns a synthetic connection string corresponding to the seed nodes. -
checkConnectionString
public static void checkConnectionString(CoreEnvironment env, boolean ownsEnvironment, ConnectionString connStr)
-