public class ReplicationConnectionUrl extends ConnectionUrl
ConnectionUrl.HostsCardinality, ConnectionUrl.TypeDEFAULT_HOST, DEFAULT_PORT, hosts, originalConnStr, originalDatabase, properties, type| Constructor and Description |
|---|
ReplicationConnectionUrl(ConnectionUrlParser connStrParser,
java.util.Properties info)
Constructs an instance of
ReplicationConnectionUrl, performing all the required initializations. |
ReplicationConnectionUrl(java.util.List<HostInfo> sources,
java.util.List<HostInfo> replicas,
java.util.Map<java.lang.String,java.lang.String> properties)
Constructs an instance of a
ReplicationConnectionUrl based on a list of source hosts, a list of replica hosts and a global set of properties
instead of connection string parsing. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<HostInfo> |
getHostsList(HostsListView view)
Returns a list of the hosts in this connection URL, filtered for the given view.
|
HostInfo |
getReplicaHostOrSpawnIsolated(java.lang.String hostPortPair)
Returns an existing replica host info with the same host:port part or spawns a new isolated host info based on this connection URL if none was found.
|
java.util.List<HostInfo> |
getReplicaHostsListFromHostPortPairs(java.util.Collection<java.lang.String> hostPortPairs)
Returns the list of
HostInfo instances that matches the given collection of host:port pairs in the corresponding hosts list. |
java.util.List<java.lang.String> |
getReplicasListAsHostPortPairs()
Returns a list of this connection URL replica hosts in the form of host:port pairs.
|
HostInfo |
getSourceHostOrSpawnIsolated(java.lang.String hostPortPair)
Returns an existing source host info with the same host:port part or spawns a new isolated host info based on this connection URL if none was found.
|
java.util.List<HostInfo> |
getSourceHostsListFromHostPortPairs(java.util.Collection<java.lang.String> hostPortPairs)
Returns the list of
HostInfo instances that matches the given collection of host:port pairs in the corresponding hosts list. |
java.util.List<java.lang.String> |
getSourcesListAsHostPortPairs()
Returns a list of this connection URL source hosts in the form of host:port pairs.
|
acceptsUrl, buildHostInfo, collectHostsInfo, collectProperties, expandPropertiesFromConfigFiles, fixHostInfo, fixProtocolDependencies, getConnectionArgumentsAsProperties, getConnectionUrlInstance, getDatabase, getDatabaseUrl, getDefaultHost, getDefaultPassword, getDefaultPort, getDefaultUser, getHostOrSpawnIsolated, getHostOrSpawnIsolated, getHostsList, getHostsListFromDnsSrv, getMainHost, getOriginalProperties, getPropertiesFromConfigFiles, getType, hostsCount, injectPerTypeProperties, preprocessPerTypeHostProperties, replaceLegacyPropertyValues, setupPropertiesTransformer, toStringpublic ReplicationConnectionUrl(ConnectionUrlParser connStrParser, java.util.Properties info)
ReplicationConnectionUrl, performing all the required initializations.connStrParser - a ConnectionUrlParser instance containing the parsed version of the original connection stringinfo - the connection arguments mappublic ReplicationConnectionUrl(java.util.List<HostInfo> sources, java.util.List<HostInfo> replicas, java.util.Map<java.lang.String,java.lang.String> properties)
ReplicationConnectionUrl based on a list of source hosts, a list of replica hosts and a global set of properties
instead of connection string parsing.
ConnectionUrl instances created by this process are not cached.sources - the source hosts list to use in this connection stringreplicas - the replica hosts list to use in this connection stringproperties - the properties common to all hostspublic java.util.List<HostInfo> getHostsList(HostsListView view)
getHostsList in class ConnectionUrlview - the type of the view to use in the returned list of hosts.public HostInfo getSourceHostOrSpawnIsolated(java.lang.String hostPortPair)
hostPortPair - the host:port part to search forpublic java.util.List<java.lang.String> getSourcesListAsHostPortPairs()
public java.util.List<HostInfo> getSourceHostsListFromHostPortPairs(java.util.Collection<java.lang.String> hostPortPairs)
HostInfo instances that matches the given collection of host:port pairs in the corresponding hosts list. Isolated host info
elements are spawned for the missing elements.hostPortPairs - a list of host:port pairsHostInfo instances corresponding to the given host:port pairspublic HostInfo getReplicaHostOrSpawnIsolated(java.lang.String hostPortPair)
hostPortPair - the host:port part to search forpublic java.util.List<java.lang.String> getReplicasListAsHostPortPairs()
public java.util.List<HostInfo> getReplicaHostsListFromHostPortPairs(java.util.Collection<java.lang.String> hostPortPairs)
HostInfo instances that matches the given collection of host:port pairs in the corresponding hosts list. Isolated host info
elements are spawned for the missing elements.hostPortPairs - a list of host:port pairsHostInfo instances corresponding to the given host:port pairs