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

public Class LoadBalanceDnsSrvConnectionUrl

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, com.mysql.cj.util.StringUtils

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
LoadBalanceDnsSrvConnectionUrl(ConnectionUrlParser
a ConnectionUrlParser instance containing the parsed version of the original connection string
connStrParser
,
Properties
the connection arguments map
info
)

Constructs an instance of LoadBalanceDnsSrvConnectionUrl, performing all the required initializations and validations.

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.

protected void
injectPerTypeProperties(Map<String, String>
the properties already containing all known connection arguments
props
)

Overrides com.mysql.cj.conf.ConnectionUrl.injectPerTypeProperties.

Injects additional properties into the connection arguments while the connection arguments map is being constructed.

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

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

LoadBalanceDnsSrvConnectionUrlback to summary
public LoadBalanceDnsSrvConnectionUrl(ConnectionUrlParser connStrParser, Properties info)

Constructs an instance of LoadBalanceDnsSrvConnectionUrl, performing all the required initializations and validations.

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
injectPerTypePropertiesback to summary
protected void injectPerTypeProperties(Map<String, String> props)

Overrides com.mysql.cj.conf.ConnectionUrl.injectPerTypeProperties.

Injects additional properties into the connection arguments while the connection arguments map is being constructed.

Parameters
props:Map<String, String>

the properties already containing all known connection arguments

Annotations
@Override