Package com.mysql.cj.conf.url
Class XDevApiConnectionUrl
java.lang.Object
com.mysql.cj.conf.ConnectionUrl
com.mysql.cj.conf.url.XDevApiConnectionUrl
- All Implemented Interfaces:
DatabaseUrlContainer
public class XDevApiConnectionUrl 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
DEFAULT_HOST, hosts, originalConnStr, originalDatabase, properties, type -
Constructor Summary
Constructors Constructor Description XDevApiConnectionUrl(ConnectionUrlParser connStrParser, java.util.Properties info)Constructs an instance ofXDevApiConnectionUrl, 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.intgetDefaultPort()Returns the default port.java.util.List<HostInfo>getHostsList(HostsListView view)Returns a list of the hosts in this connection URL, filtered for the given view.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, getDefaultHost, getDefaultPassword, getDefaultUser, getHostOrSpawnIsolated, getHostOrSpawnIsolated, getHostsList, getHostsListFromDnsSrv, getMainHost, getOriginalProperties, getPropertiesFromConfigFiles, getType, hostsCount, injectPerTypeProperties, replaceLegacyPropertyValues, setupPropertiesTransformer, toString
-
Constructor Details
-
XDevApiConnectionUrl
Constructs an instance ofXDevApiConnectionUrl, 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
-
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
Description copied from class:ConnectionUrlReturns a list of the hosts in this connection URL, filtered for the given view. By default returns all hosts. Subclasses should override this method in order to implement support for different views, usually by splitting the global hosts into smaller sub-lists.- 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 this connection URL, filtered for the given view.
-