Top Fields Constructors Methods
com.mysql.cj.conf.url

public Class FailoverDnsSrvConnectionUrl

extends ConnectionUrl
Class Inheritance
Imports
java.util.List, .Map, .Properties, com.mysql.cj.Messages, com.mysql.cj.conf.BooleanPropertyDefinition, .ConnectionUrl, .ConnectionUrlParser, .HostInfo, .HostsListView, .PropertyKey, com.mysql.cj.exceptions.ExceptionFactory, .InvalidConnectionAttributeException

Field Summary

Modifier and TypeField and Description
private static final String
private static final int
Inherited from com.mysql.cj.conf.ConnectionUrl:
hostsoriginalConnStroriginalDatabasepropertiestype

Constructor Summary

AccessConstructor and Description
public
FailoverDnsSrvConnectionUrl(ConnectionUrlParser
a ConnectionUrlParser instance containing the parsed version of the original connection string
connStrParser
,
Properties
the connection arguments map
info
)

Constructs an instance of FailoverDnsSrvConnectionUrl, performing all the required initializations.

Method Summary

Modifier and TypeMethod and Description
public String
getDefaultHost()

Overrides com.mysql.cj.conf.ConnectionUrl.getDefaultHost.

Returns the default host.

public int
getDefaultPort()

Overrides com.mysql.cj.conf.ConnectionUrl.getDefaultPort.

Returns the default port.

public List<HostInfo>

Returns:

the hosts list from the result of the DNS SRV lookup, filtered for the given view.
getHostsList
(HostsListView
the type of the view to use in the returned list of hosts. This argument is ignored in this implementation.
view
)

Overrides com.mysql.cj.conf.ConnectionUrl.getHostsList.

Returns a hosts list built from the result of the DNS SRV lookup for the original host name.

Inherited from com.mysql.cj.conf.ConnectionUrl:
acceptsUrlbuildHostInfocollectHostsInfocollectPropertiesexpandPropertiesFromConfigFilesfixHostInfofixProtocolDependenciesgetConnectionArgumentsAsPropertiesgetConnectionUrlInstancegetDatabasegetDatabaseUrlgetDefaultPasswordgetDefaultUsergetHostOrSpawnIsolatedgetHostOrSpawnIsolatedgetHostsListgetHostsListFromDnsSrvgetMainHostgetOriginalPropertiesgetPropertiesFromConfigFilesgetTypehostsCountinjectPerTypePropertiespreprocessPerTypeHostPropertiesreplaceLegacyPropertyValuessetupPropertiesTransformertoString

Field Detail

DEFAULT_HOSTback to summary
private static final String DEFAULT_HOST

Hides com.mysql.cj.conf.ConnectionUrl.DEFAULT_HOST.

DEFAULT_PORTback to summary
private static final int DEFAULT_PORT

Hides com.mysql.cj.conf.ConnectionUrl.DEFAULT_PORT.

Constructor Detail

FailoverDnsSrvConnectionUrlback to summary
public FailoverDnsSrvConnectionUrl(ConnectionUrlParser connStrParser, Properties info)

Constructs an instance of FailoverDnsSrvConnectionUrl, performing all the required initializations.

Parameters
connStrParser:ConnectionUrlParser

a ConnectionUrlParser instance containing the parsed version of the original connection string

info:Properties

the connection arguments map

Method Detail

getDefaultHostback to summary
public String getDefaultHost()

Overrides com.mysql.cj.conf.ConnectionUrl.getDefaultHost.

Doc from com.mysql.cj.conf.ConnectionUrl.getDefaultHost.

Returns the default host. Subclasses must override this method if they have different default host value.

Returns:String

the default host

Annotations
@Override
getDefaultPortback to summary
public int getDefaultPort()

Overrides com.mysql.cj.conf.ConnectionUrl.getDefaultPort.

Doc from com.mysql.cj.conf.ConnectionUrl.getDefaultPort.

Returns the default port. Subclasses must override this method if they have different default port value.

Returns:int

the default port

Annotations
@Override
getHostsListback to summary
public List<HostInfo> getHostsList(HostsListView view)

Overrides com.mysql.cj.conf.ConnectionUrl.getHostsList.

Returns a hosts list built from the result of the DNS SRV lookup for the original host name.

Parameters
view:HostsListView

the type of the view to use in the returned list of hosts. This argument is ignored in this implementation.

Returns:List<HostInfo>

the hosts list from the result of the DNS SRV lookup, filtered for the given view.

Annotations
@Override