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
  • Field Details

  • Constructor Details

    • ConnectionString

      protected ConnectionString​(String input)
  • Method Details

    • create

      public static ConnectionString create​(String input)
    • fromHostnames

      public static ConnectionString fromHostnames​(List<String> hostnames)
    • scheme

      public ConnectionString.Scheme scheme()
    • username

      public String username()
    • hosts

      Get the list of all hosts from the connection string.
      Returns:
      hosts
    • params

      public Map<String,​String> 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

      public String toString()
      Overrides:
      toString in class Object
    • original

      public String original()
      Returns the unmodified, original connection string.