类 LoadBalancedMySQLConnection
- java.lang.Object
-
- com.mysql.cj.jdbc.ha.MultiHostMySQLConnection
-
- com.mysql.cj.jdbc.ha.LoadBalancedMySQLConnection
-
- 所有已实现的接口:
LoadBalancedConnection,JdbcConnection,MysqlConnection,TransactionEventHandler,AutoCloseable,Connection,Wrapper
public class LoadBalancedMySQLConnection extends MultiHostMySQLConnection implements LoadBalancedConnection
-
-
字段概要
-
从类继承的字段 com.mysql.cj.jdbc.ha.MultiHostMySQLConnection
thisAsProxy
-
-
构造器概要
构造器 构造器 说明 LoadBalancedMySQLConnection(LoadBalancedConnectionProxy proxy)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanaddHost(String host)voidclose()LoadBalancedConnectionProxygetThisAsProxy()booleanisWrapperFor(Class<?> iface)voidping()Detect if the connection is still good by sending a ping command to the server.voidping(boolean allConnections)voidremoveHost(String host)voidremoveHostWhenNotInUse(String host)<T> Tunwrap(Class<T> iface)-
从类继承的方法 com.mysql.cj.jdbc.ha.MultiHostMySQLConnection
abort, abortInternal, changeUser, checkClosed, cleanup, clearHasTriedMaster, clearWarnings, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, commit, createArrayOf, createBlob, createClob, createNClob, createNewIO, createSQLXML, createStatement, createStatement, createStatement, createStruct, decachePreparedStatement, getActiveMySQLConnection, getActiveStatementCount, getAutoCommit, getAutoIncrementIncrement, getCachedMetaData, getCatalog, getCharacterSetMetadata, getClientInfo, getClientInfo, getClientInfoProviderImpl, getConnectionMutex, getDatabase, getExceptionInterceptor, getHoldability, getHost, getHostPortPair, getId, getIdleFor, getMetaData, getMetadataSafeStatement, getMultiHostParentProxy, getMultiHostSafeProxy, getNetworkTimeout, getProperties, getPropertySet, getQueryInterceptorsInstances, getSchema, getServerSessionStateController, getServerVersion, getSession, getSessionMaxRows, getStatementComment, getTransactionIsolation, getTypeMap, getURL, getUser, getWarnings, hasSameProperties, hasTriedMaster, initializeResultsMetadataFromCache, initializeSafeQueryInterceptors, isClosed, isInGlobalTx, isProxySet, isReadOnly, isReadOnly, isSameResource, isServerLocal, isSourceConnection, isValid, lowerCaseTableNames, nativeSQL, normalClose, pingInternal, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, realClose, recachePreparedStatement, registerStatement, releaseSavepoint, resetServerState, rollback, rollback, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setDatabase, setFailedOver, setHoldability, setInGlobalTx, setNetworkTimeout, setProxy, setReadOnly, setReadOnlyInternal, setSavepoint, setSavepoint, setSchema, setSessionMaxRows, setStatementComment, setTransactionIsolation, setTypeMap, shutdownServer, storesLowerCaseTableName, throwConnectionClosedException, transactionBegun, transactionCompleted, unregisterStatement, unSafeQueryInterceptors
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 java.sql.Connection
abort, beginRequest, clearWarnings, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMap
-
从接口继承的方法 com.mysql.cj.jdbc.JdbcConnection
abortInternal, changeUser, clearHasTriedMaster, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, decachePreparedStatement, getActiveMySQLConnection, getActiveStatementCount, getAutoIncrementIncrement, getCachedMetaData, getCharacterSetMetadata, getClientInfoProviderImpl, getDatabase, getHost, getHostPortPair, getIdleFor, getMetadataSafeStatement, getMultiHostParentProxy, getMultiHostSafeProxy, getPropertySet, getQueryInterceptorsInstances, getServerVersion, getSessionMaxRows, getStatementComment, hasSameProperties, hasTriedMaster, initializeResultsMetadataFromCache, initializeSafeQueryInterceptors, isInGlobalTx, isMasterConnection, isProxySet, isReadOnly, isSameResource, isServerLocal, isSourceConnection, lowerCaseTableNames, pingInternal, realClose, recachePreparedStatement, registerStatement, resetServerState, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, setDatabase, setFailedOver, setInGlobalTx, setProxy, setReadOnlyInternal, setSessionMaxRows, setStatementComment, shutdownServer, storesLowerCaseTableName, throwConnectionClosedException, unregisterStatement, unSafeQueryInterceptors
-
从接口继承的方法 com.mysql.cj.MysqlConnection
checkClosed, cleanup, createNewIO, getConnectionMutex, getExceptionInterceptor, getId, getProperties, getServerSessionStateController, getSession, getURL, getUser, normalClose
-
从接口继承的方法 com.mysql.cj.TransactionEventHandler
transactionBegun, transactionCompleted
-
-
-
-
构造器详细资料
-
LoadBalancedMySQLConnection
public LoadBalancedMySQLConnection(LoadBalancedConnectionProxy proxy)
-
-
方法详细资料
-
getThisAsProxy
public LoadBalancedConnectionProxy getThisAsProxy()
-
close
public void close() throws SQLException- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Connection- 覆盖:
close在类中MultiHostMySQLConnection- 抛出:
SQLException
-
ping
public void ping() throws SQLException从接口复制的说明:JdbcConnectionDetect if the connection is still good by sending a ping command to the server.- 指定者:
ping在接口中JdbcConnection- 覆盖:
ping在类中MultiHostMySQLConnection- 抛出:
SQLException- if the ping fails
-
ping
public void ping(boolean allConnections) throws SQLException- 指定者:
ping在接口中LoadBalancedConnection- 抛出:
SQLException
-
addHost
public boolean addHost(String host) throws SQLException
- 指定者:
addHost在接口中LoadBalancedConnection- 抛出:
SQLException
-
removeHost
public void removeHost(String host) throws SQLException
- 指定者:
removeHost在接口中LoadBalancedConnection- 抛出:
SQLException
-
removeHostWhenNotInUse
public void removeHostWhenNotInUse(String host) throws SQLException
- 指定者:
removeHostWhenNotInUse在接口中LoadBalancedConnection- 抛出:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- 指定者:
isWrapperFor在接口中Wrapper- 覆盖:
isWrapperFor在类中MultiHostMySQLConnection- 抛出:
SQLException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- 指定者:
unwrap在接口中Wrapper- 覆盖:
unwrap在类中MultiHostMySQLConnection- 抛出:
SQLException
-
-