Package com.mysql.cj.conf.url
Class FailoverDnsSrvConnectionUrl
java.lang.Object
com.mysql.cj.conf.ConnectionUrl
com.mysql.cj.conf.url.FailoverDnsSrvConnectionUrl
- All Implemented Interfaces:
DatabaseUrlContainer
public class FailoverDnsSrvConnectionUrl extends ConnectionUrl
-
Nested Class Summary
Nested classes/interfaces inherited from class com.mysql.cj.conf.ConnectionUrl
ConnectionUrl.HostsCardinality, ConnectionUrl.Type -
Field Summary
Fields inherited from class com.mysql.cj.conf.ConnectionUrl
hosts, originalConnStr, originalDatabase, properties, type -
Constructor Summary
Constructors Constructor Description FailoverDnsSrvConnectionUrl(ConnectionUrlParser connStrParser, java.util.Properties info)Constructs an instance ofFailoverDnsSrvConnectionUrl, performing all the required initializations. -
Method Summary
Modifier and Type Method Description java.lang.StringgetDefaultHost()Returns the default host.intgetDefaultPort()Returns the default port.java.util.List<HostInfo>getHostsList(HostsListView view)Returns a hosts list built from the result of the DNS SRV lookup for the original host name.Methods inherited from class com.mysql.cj.conf.ConnectionUrl
acceptsUrl, buildHostInfo, collectHostsInfo, collectProperties, expandPropertiesFromConfigFiles, fixHostInfo, fixProtocolDependencies, getConnectionArgumentsAsProperties, getConnectionUrlInstance, getDatabase, getDatabaseUrl, getDefaultPassword, getDefaultUser, getHostOrSpawnIsolated, getHostOrSpawnIsolated, getHostsList, getHostsListFromDnsSrv, getMainHost, getOriginalProperties, getPropertiesFromConfigFiles, getType, hostsCount, injectPerTypeProperties, preprocessPerTypeHostProperties, replaceLegacyPropertyValues, setupPropertiesTransformer, toString
-
Constructor Details
-
FailoverDnsSrvConnectionUrl
Constructs an instance ofFailoverDnsSrvConnectionUrl, performing all the required initializations.- Parameters:
connStrParser- aConnectionUrlParserinstance containing the parsed version of the original connection stringinfo- the connection arguments map
-
-
Method Details
-
getDefaultHost
public java.lang.String getDefaultHost()Description copied from class:ConnectionUrlReturns the default host. Subclasses must override this method if they have different default host value.- Overrides:
getDefaultHostin classConnectionUrl- Returns:
- the default host
-
getDefaultPort
public int getDefaultPort()Description copied from class:ConnectionUrlReturns the default port. Subclasses must override this method if they have different default port value.- Overrides:
getDefaultPortin classConnectionUrl- Returns:
- the default port
-
getHostsList
Returns a hosts list built from the result of the DNS SRV lookup for the original host name.- Overrides:
getHostsListin classConnectionUrl- Parameters:
view- the type of the view to use in the returned list of hosts. This argument is ignored in this implementation.- Returns:
- the hosts list from the result of the DNS SRV lookup, filtered for the given view.
-