public static enum ConnectionUrl.Type extends Enum<ConnectionUrl.Type>
| Enum Constant and Description |
|---|
FAILOVER_CONNECTION |
FAILOVER_DNS_SRV_CONNECTION |
LOADBALANCE_CONNECTION |
LOADBALANCE_DNS_SRV_CONNECTION |
REPLICATION_CONNECTION |
REPLICATION_DNS_SRV_CONNECTION |
SINGLE_CONNECTION |
XDEVAPI_DNS_SRV_SESSION |
XDEVAPI_SESSION |
| Modifier and Type | Field and Description |
|---|---|
private ConnectionUrl.Type |
alternateDnsSrvType |
private ConnectionUrl.HostsCardinality |
cardinality |
private PropertyKey |
dnsSrvPropertyKey |
private String |
implementingClass |
private String |
scheme |
| Modifier and Type | Method and Description |
|---|---|
static ConnectionUrl.Type |
fromValue(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,
Properties info)
Instantiates a class that implements the right type of connection URLs for the given
ConnectionUrlParser. |
PropertyKey |
getDnsSrvPropertyKey() |
String |
getImplementingClass() |
private ConnectionUrl |
getImplementingInstance(ConnectionUrlParser parser,
Properties info)
Instantiates a class that implements this type of connection URLs with the given arguments.
|
String |
getScheme() |
static boolean |
isSupported(String scheme)
Checks if the given scheme corresponds to one of the connection types the driver supports.
|
static ConnectionUrl.Type |
valueOf(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
private String scheme
private ConnectionUrl.HostsCardinality cardinality
private String implementingClass
private PropertyKey dnsSrvPropertyKey
private ConnectionUrl.Type alternateDnsSrvType
public static ConnectionUrl.Type[] values()
for (ConnectionUrl.Type c : ConnectionUrl.Type.values()) System.out.println(c);
public static ConnectionUrl.Type valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getScheme()
public ConnectionUrl.HostsCardinality getCardinality()
public String getImplementingClass()
public PropertyKey getDnsSrvPropertyKey()
public ConnectionUrl.Type getAlternateDnsSrvType()
public static ConnectionUrl.Type fromValue(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, 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(String scheme)
scheme - scheme part from connection string, like "jdbc:mysql:"private ConnectionUrl getImplementingInstance(ConnectionUrlParser parser, Properties info)
parser - the ConnectionUrlParser containing the URL components.info - a connection properties map to add to the ConnectionUrl structure.ConnectionUrl.