Package com.mysql.cj.conf.url
Class XDevApiDnsSrvConnectionUrl
java.lang.Object
com.mysql.cj.conf.ConnectionUrl
com.mysql.cj.conf.url.XDevApiDnsSrvConnectionUrl
- All Implemented Interfaces:
DatabaseUrlContainer
public class XDevApiDnsSrvConnectionUrl 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 XDevApiDnsSrvConnectionUrl(ConnectionUrlParser connStrParser, java.util.Properties info)Constructs an instance ofXDevApiDnsSrvConnectionUrl, performing all the required initializations. -
Method Summary
Modifier and Type Method Description protected voidfixProtocolDependencies(java.util.Map<java.lang.String,java.lang.String> hostProps)Fixes the protocol (TCP vs PIPE) dependencies for the given host properties map.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.protected voidpreprocessPerTypeHostProperties(java.util.Map<java.lang.String,java.lang.String> hostProps)Subclasses should override this to perform any required pre-processing on the host information properties.Methods inherited from class com.mysql.cj.conf.ConnectionUrl
acceptsUrl, buildHostInfo, collectHostsInfo, collectProperties, expandPropertiesFromConfigFiles, fixHostInfo, getConnectionArgumentsAsProperties, getConnectionUrlInstance, getDatabase, getDatabaseUrl, getDefaultPassword, getDefaultUser, getHostOrSpawnIsolated, getHostOrSpawnIsolated, getHostsList, getHostsListFromDnsSrv, getMainHost, getOriginalProperties, getPropertiesFromConfigFiles, getType, hostsCount, injectPerTypeProperties, replaceLegacyPropertyValues, setupPropertiesTransformer, toString
-
Constructor Details
-
XDevApiDnsSrvConnectionUrl
Constructs an instance ofXDevApiDnsSrvConnectionUrl, performing all the required initializations.- Parameters:
connStrParser- aConnectionUrlParserinstance containing the parsed version of the original connection stringinfo- the connection arguments map
-
-
Method Details
-
preprocessPerTypeHostProperties
protected void preprocessPerTypeHostProperties(java.util.Map<java.lang.String,java.lang.String> hostProps)Description copied from class:ConnectionUrlSubclasses should override this to perform any required pre-processing on the host information properties.- Overrides:
preprocessPerTypeHostPropertiesin classConnectionUrl- Parameters:
hostProps- the host properties map to process
-
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
-
fixProtocolDependencies
protected void fixProtocolDependencies(java.util.Map<java.lang.String,java.lang.String> hostProps)Description copied from class:ConnectionUrlFixes the protocol (TCP vs PIPE) dependencies for the given host properties map.- Overrides:
fixProtocolDependenciesin classConnectionUrl- Parameters:
hostProps- the host properties map to fix
-
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.
-