public class ReplicationConnectionGroup
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
addReplicaHost(java.lang.String hostPortPair)
Adds a host to the replicas hosts list.
|
void |
addSlaveHost(java.lang.String hostPortPair)
Deprecated.
|
long |
getActiveConnectionCount() |
long |
getConnectionCount() |
int |
getConnectionCountWithHostAsMaster(java.lang.String hostPortPair)
Deprecated.
|
int |
getConnectionCountWithHostAsReplica(java.lang.String hostPortPair) |
int |
getConnectionCountWithHostAsSlave(java.lang.String hostPortPair)
Deprecated.
|
int |
getConnectionCountWithHostAsSource(java.lang.String hostPortPair) |
java.lang.String |
getGroupName() |
java.util.Collection<java.lang.String> |
getMasterHosts()
Deprecated.
|
long |
getNumberOfReplicaPromotions() |
long |
getNumberOfReplicasAdded() |
long |
getNumberOfReplicasRemoved() |
long |
getNumberOfSlavePromotions()
Deprecated.
|
long |
getNumberOfSlavesAdded()
Deprecated.
|
long |
getNumberOfSlavesRemoved()
Deprecated.
|
java.util.Collection<java.lang.String> |
getReplicaHosts() |
java.util.Collection<java.lang.String> |
getSlaveHosts()
Deprecated.
|
java.util.Collection<java.lang.String> |
getSourceHosts() |
long |
getTotalConnectionCount() |
void |
handleCloseConnection(ReplicationConnection conn) |
void |
promoteReplicaToSource(java.lang.String hostPortPair)
Promotes a replica host to source.
|
void |
promoteSlaveToMaster(java.lang.String hostPortPair)
Deprecated.
|
long |
registerReplicationConnection(ReplicationConnection conn,
java.util.List<java.lang.String> localSourceList,
java.util.List<java.lang.String> localReplicaList) |
void |
removeMasterHost(java.lang.String hostPortPair)
Deprecated.
|
void |
removeMasterHost(java.lang.String hostPortPair,
boolean closeGently)
Deprecated.
|
void |
removeReplicaHost(java.lang.String hostPortPair,
boolean closeGently)
Removes a host from the replicas hosts list.
|
void |
removeSlaveHost(java.lang.String hostPortPair,
boolean closeGently)
Deprecated.
|
void |
removeSourceHost(java.lang.String hostPortPair)
Removes a host from the sources hosts list.
|
void |
removeSourceHost(java.lang.String hostPortPair,
boolean closeGently)
Removes a host from the sources hosts list.
|
java.lang.String |
toString() |
public long getConnectionCount()
public long registerReplicationConnection(ReplicationConnection conn, java.util.List<java.lang.String> localSourceList, java.util.List<java.lang.String> localReplicaList)
public java.lang.String getGroupName()
public java.util.Collection<java.lang.String> getSourceHosts()
@Deprecated public java.util.Collection<java.lang.String> getMasterHosts()
getSourceHosts() instead.public java.util.Collection<java.lang.String> getReplicaHosts()
@Deprecated public java.util.Collection<java.lang.String> getSlaveHosts()
getReplicaHosts() instead.public void addReplicaHost(java.lang.String hostPortPair)
throws java.sql.SQLException
ReplicationConnection.addReplicaHost(String) could result in undesirable locking issues, assuming that this method is
synchronized by nature.
This is a no-op if the group already has this host in a replica role.hostPortPair - "host:port"java.sql.SQLException - if an error occurs@Deprecated
public void addSlaveHost(java.lang.String hostPortPair)
throws java.sql.SQLException
addReplicaHost(String) instead.hostPortPair - host:portjava.sql.SQLExceptionpublic void handleCloseConnection(ReplicationConnection conn)
public void removeReplicaHost(java.lang.String hostPortPair,
boolean closeGently)
throws java.sql.SQLException
ReplicationConnection.removeReplica(String, boolean) could result in undesirable locking issues, assuming that this method
is
synchronized by nature.
This is a no-op if the group doesn't have this host in a replica role.hostPortPair - "host:port"closeGently - remove host when it's not in usejava.sql.SQLException - if an error occurs@Deprecated
public void removeSlaveHost(java.lang.String hostPortPair,
boolean closeGently)
throws java.sql.SQLException
removeReplicaHost(String, boolean) instead.hostPortPair - host:portcloseGently - optionjava.sql.SQLExceptionpublic void promoteReplicaToSource(java.lang.String hostPortPair)
throws java.sql.SQLException
ReplicationConnection.promoteReplicaToSource(String) could result in undesirable locking issues, assuming that this method
is
synchronized by nature.
This is a no-op if the group already has this host in a source role and not in replica role.hostPortPair - "host:port"java.sql.SQLException - if an error occurs@Deprecated
public void promoteSlaveToMaster(java.lang.String hostPortPair)
throws java.sql.SQLException
promoteReplicaToSource(String) instead.hostPortPair - host:portjava.sql.SQLExceptionpublic void removeSourceHost(java.lang.String hostPortPair)
throws java.sql.SQLException
hostPortPair - host:portjava.sql.SQLException - if an error occurs@Deprecated
public void removeMasterHost(java.lang.String hostPortPair)
throws java.sql.SQLException
removeSourceHost(String) instead.hostPortPair - host:portjava.sql.SQLExceptionpublic void removeSourceHost(java.lang.String hostPortPair,
boolean closeGently)
throws java.sql.SQLException
ReplicationConnection.removeSourceHost(String, boolean) could result in undesirable locking issues, assuming that this
method is synchronized by nature.
This is a no-op if the group doesn't have this host in a source role.hostPortPair - "host:port"closeGently - remove host when it's not in usejava.sql.SQLException - if an error occurs@Deprecated
public void removeMasterHost(java.lang.String hostPortPair,
boolean closeGently)
throws java.sql.SQLException
removeSourceHost(String, boolean) instead.hostPortPair - host:portcloseGently - optionjava.sql.SQLExceptionpublic int getConnectionCountWithHostAsReplica(java.lang.String hostPortPair)
@Deprecated public int getConnectionCountWithHostAsSlave(java.lang.String hostPortPair)
getConnectionCountWithHostAsReplica(String) instead.hostPortPair - host:portpublic int getConnectionCountWithHostAsSource(java.lang.String hostPortPair)
@Deprecated public int getConnectionCountWithHostAsMaster(java.lang.String hostPortPair)
getConnectionCountWithHostAsSource(String) instead.hostPortPair - host:portpublic long getNumberOfReplicasAdded()
@Deprecated public long getNumberOfSlavesAdded()
getNumberOfReplicasAdded() instead.public long getNumberOfReplicasRemoved()
@Deprecated public long getNumberOfSlavesRemoved()
getNumberOfReplicasRemoved() instead.public long getNumberOfReplicaPromotions()
@Deprecated public long getNumberOfSlavePromotions()
getNumberOfReplicaPromotions() instead.public long getTotalConnectionCount()
public long getActiveConnectionCount()
public java.lang.String toString()
toString in class java.lang.Object