Class ConnectionGroup
java.lang.Object
com.mysql.jdbc.ConnectionGroup
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given host (host:port pair) to this Connection Group.voidAdd the given host (host:port pair) to this Connection Group and, consequently, to all the load-balanced connections it holds.voidintlonglonglonglonglonglongregisterConnectionProxy(LoadBalancedConnectionProxy proxy, List<String> localHostList) voidremoveHost(String hostPortPair) Remove the given host (host:port pair) from this Connection Group.voidremoveHost(String hostPortPair, boolean removeExisting) Remove the given host (host:port pair) from this Connection Group.voidremoveHost(String hostPortPair, boolean removeExisting, boolean waitForGracefulFailover) Remove the given host (host:port pair) from this Connection Group and, consequently, from all the load-balanced connections it holds.
-
Constructor Details
-
ConnectionGroup
ConnectionGroup(String groupName)
-
-
Method Details
-
registerConnectionProxy
-
getGroupName
-
getInitialHosts
-
getActiveHostCount
public int getActiveHostCount() -
getClosedHosts
-
getTotalLogicalConnectionCount
public long getTotalLogicalConnectionCount() -
getActiveLogicalConnectionCount
public long getActiveLogicalConnectionCount() -
getActivePhysicalConnectionCount
public long getActivePhysicalConnectionCount() -
getTotalPhysicalConnectionCount
public long getTotalPhysicalConnectionCount() -
getTotalTransactionCount
public long getTotalTransactionCount() -
closeConnectionProxy
-
removeHost
Remove the given host (host:port pair) from this Connection Group.- Parameters:
hostPortPair- The host:port pair to remove.- Throws:
SQLException
-
removeHost
Remove the given host (host:port pair) from this Connection Group.- Parameters:
hostPortPair- The host:port pair to remove.removeExisting- Whether affects existing load-balanced connections or only new ones.- Throws:
SQLException
-
removeHost
public void removeHost(String hostPortPair, boolean removeExisting, boolean waitForGracefulFailover) throws SQLException Remove the given host (host:port pair) from this Connection Group and, consequently, from all the load-balanced connections it holds.- Parameters:
hostPortPair- The host:port pair to remove.removeExisting- Whether affects existing load-balanced connections or only new ones.waitForGracefulFailover- If true instructs the load-balanced connections to fail-over the underlying active connection before removing this host, otherwise remove immediately.- Throws:
SQLException
-
addHost
Add the given host (host:port pair) to this Connection Group.- Parameters:
hostPortPair- The host:port pair to add.- Throws:
SQLException
-
addHost
Add the given host (host:port pair) to this Connection Group and, consequently, to all the load-balanced connections it holds.- Parameters:
hostPortPair- The host:port pair to add.forExisting- Whether affects existing load-balanced connections or only new ones.
-