类 FailoverDnsSrvConnectionUrl
- java.lang.Object
-
- com.mysql.cj.conf.ConnectionUrl
-
- com.mysql.cj.conf.url.FailoverDnsSrvConnectionUrl
-
- 所有已实现的接口:
DatabaseUrlContainer
public class FailoverDnsSrvConnectionUrl extends ConnectionUrl
-
-
嵌套类概要
-
从类继承的嵌套类/接口 com.mysql.cj.conf.ConnectionUrl
ConnectionUrl.HostsCardinality, ConnectionUrl.Type
-
-
字段概要
-
从类继承的字段 com.mysql.cj.conf.ConnectionUrl
hosts, originalConnStr, originalDatabase, properties, type
-
-
构造器概要
构造器 构造器 说明 FailoverDnsSrvConnectionUrl(ConnectionUrlParser connStrParser, Properties info)Constructs an instance ofFailoverDnsSrvConnectionUrl, performing all the required initializations.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetDefaultHost()Returns the default host.intgetDefaultPort()Returns the default port.List<HostInfo>getHostsList(HostsListView view)Returns a hosts list built from the result of the DNS SRV lookup for the original host name.-
从类继承的方法 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
-
-
-
-
构造器详细资料
-
FailoverDnsSrvConnectionUrl
public FailoverDnsSrvConnectionUrl(ConnectionUrlParser connStrParser, Properties info)
Constructs an instance ofFailoverDnsSrvConnectionUrl, performing all the required initializations.- 参数:
connStrParser- aConnectionUrlParserinstance containing the parsed version of the original connection stringinfo- the connection arguments map
-
-
方法详细资料
-
getDefaultHost
public String getDefaultHost()
从类复制的说明:ConnectionUrlReturns the default host. Subclasses must override this method if they have different default host value.- 覆盖:
getDefaultHost在类中ConnectionUrl- 返回:
- the default host
-
getDefaultPort
public int getDefaultPort()
从类复制的说明:ConnectionUrlReturns the default port. Subclasses must override this method if they have different default port value.- 覆盖:
getDefaultPort在类中ConnectionUrl- 返回:
- the default port
-
getHostsList
public List<HostInfo> getHostsList(HostsListView view)
Returns a hosts list built from the result of the DNS SRV lookup for the original host name.- 覆盖:
getHostsList在类中ConnectionUrl- 参数:
view- the type of the view to use in the returned list of hosts. This argument is ignored in this implementation.- 返回:
- the hosts list from the result of the DNS SRV lookup, filtered for the given view.
-
-