public static enum ConnectionUrl.Type extends java.lang.Enum<ConnectionUrl.Type>
| Modifier and Type | Method and Description |
|---|---|
static ConnectionUrl.Type |
fromValue(java.lang.String scheme,
int n)
Returns the
ConnectionUrl.Type corresponding to the given scheme and number of hosts, if any. |
ConnectionUrl.Type |
getAlternateDnsSrvType() |
ConnectionUrl.HostsCardinality |
getCardinality() |
static ConnectionUrl |
getConnectionUrlInstance(ConnectionUrlParser parser,
java.util.Properties info)
Instantiates a class that implements the right type of connection URLs for the given
ConnectionUrlParser. |
PropertyKey |
getDnsSrvPropertyKey() |
java.lang.String |
getImplementingClass() |
java.lang.String |
getScheme() |
static boolean |
isSupported(java.lang.String scheme)
Checks if the given scheme corresponds to one of the connection types the driver supports.
|
static ConnectionUrl.Type |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ConnectionUrl.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionUrl.Type FAILOVER_DNS_SRV_CONNECTION
public static final ConnectionUrl.Type LOADBALANCE_DNS_SRV_CONNECTION
public static final ConnectionUrl.Type REPLICATION_DNS_SRV_CONNECTION
public static final ConnectionUrl.Type XDEVAPI_DNS_SRV_SESSION
public static final ConnectionUrl.Type SINGLE_CONNECTION
public static final ConnectionUrl.Type FAILOVER_CONNECTION
public static final ConnectionUrl.Type LOADBALANCE_CONNECTION
public static final ConnectionUrl.Type REPLICATION_CONNECTION
public static final ConnectionUrl.Type XDEVAPI_SESSION
public static final ConnectionUrl.Type SINGLE_CONNECTION_AWS
public static ConnectionUrl.Type[] values()
for (ConnectionUrl.Type c : ConnectionUrl.Type.values()) System.out.println(c);
public static ConnectionUrl.Type valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic java.lang.String getScheme()
public ConnectionUrl.HostsCardinality getCardinality()
public java.lang.String getImplementingClass()
public PropertyKey getDnsSrvPropertyKey()
public ConnectionUrl.Type getAlternateDnsSrvType()
public static ConnectionUrl.Type fromValue(java.lang.String scheme, int n)
ConnectionUrl.Type corresponding to the given scheme and number of hosts, if any.
Otherwise throws an UnsupportedConnectionStringException.
Calling this method with the argument n lower than 0 skips the hosts cardinality validation.scheme - one of supported schemesn - the number of hosts in the database URLConnectionUrl.Type corresponding to the given protocol and number of hostspublic static ConnectionUrl getConnectionUrlInstance(ConnectionUrlParser parser, java.util.Properties info)
ConnectionUrlParser.parser - the ConnectionUrlParser containing the URL components.info - a connection properties map to add to the ConnectionUrl structure.ConnectionUrl.public static boolean isSupported(java.lang.String scheme)
scheme - scheme part from connection string, like "jdbc:mysql:"