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

public Class ReplicationDnsSrvConnectionUrl

extends ConnectionUrl
Class Inheritance
Imports
java.util.ArrayList, .Collections, .LinkedList, .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
private List<HostInfo>
private List<HostInfo>
private static final String
private static final String
Inherited from com.mysql.cj.conf.ConnectionUrl:
hostsoriginalConnStroriginalDatabasepropertiestype

Constructor Summary

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

Constructs an instance of ReplicationDnsSrvConnectionUrl, 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.
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.

replicaHostsback to summary
private List<HostInfo> replicaHosts
sourceHostsback to summary
private List<HostInfo> sourceHosts
TYPE_REPLICAback to summary
private static final String TYPE_REPLICA
TYPE_SOURCEback to summary
private static final String TYPE_SOURCE

Constructor Detail

ReplicationDnsSrvConnectionUrlback to summary
public ReplicationDnsSrvConnectionUrl(ConnectionUrlParser connStrParser, Properties info)

Constructs an instance of ReplicationDnsSrvConnectionUrl, 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.

Returns:List<HostInfo>

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

Annotations
@Override