public class LoadBalancedMySQLConnection extends MultiHostMySQLConnection implements LoadBalancedConnection
thisAsProxy
Constructor and Description |
---|
LoadBalancedMySQLConnection(LoadBalancedConnectionProxy proxy) |
Modifier and Type | Method and Description |
---|---|
boolean |
addHost(java.lang.String host) |
void |
close() |
LoadBalancedConnectionProxy |
getThisAsProxy() |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
ping()
Detect if the connection is still good by sending a ping command
to the server.
|
void |
ping(boolean allConnections) |
void |
removeHost(java.lang.String host) |
void |
removeHostWhenNotInUse(java.lang.String host) |
<T> T |
unwrap(java.lang.Class<T> iface) |
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, getServerVersion, getSession, getSessionMaxRows, getStatementComment, getTransactionIsolation, getTypeMap, getURL, getUser, getWarnings, hasSameProperties, hasTriedMaster, initializeResultsMetadataFromCache, initializeSafeQueryInterceptors, isClosed, isInGlobalTx, isMasterConnection, isProxySet, isReadOnly, isReadOnly, isSameResource, isServerLocal, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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, lowerCaseTableNames, pingInternal, realClose, recachePreparedStatement, registerStatement, resetServerState, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, setDatabase, setFailedOver, setInGlobalTx, setProxy, setReadOnlyInternal, setSessionMaxRows, setStatementComment, shutdownServer, storesLowerCaseTableName, throwConnectionClosedException, unregisterStatement, unSafeQueryInterceptors
abort, clearWarnings, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, 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, setTransactionIsolation, setTypeMap
checkClosed, cleanup, createNewIO, getConnectionMutex, getExceptionInterceptor, getId, getProperties, getSession, getURL, getUser, normalClose
transactionBegun, transactionCompleted
public LoadBalancedMySQLConnection(LoadBalancedConnectionProxy proxy)
public LoadBalancedConnectionProxy getThisAsProxy()
getThisAsProxy
in class MultiHostMySQLConnection
public void close() throws java.sql.SQLException
close
in interface java.lang.AutoCloseable
close
in interface java.sql.Connection
close
in class MultiHostMySQLConnection
java.sql.SQLException
public void ping() throws java.sql.SQLException
JdbcConnection
ping
in interface JdbcConnection
ping
in class MultiHostMySQLConnection
java.sql.SQLException
- if the ping failspublic void ping(boolean allConnections) throws java.sql.SQLException
ping
in interface LoadBalancedConnection
java.sql.SQLException
public boolean addHost(java.lang.String host) throws java.sql.SQLException
addHost
in interface LoadBalancedConnection
java.sql.SQLException
public void removeHost(java.lang.String host) throws java.sql.SQLException
removeHost
in interface LoadBalancedConnection
java.sql.SQLException
public void removeHostWhenNotInUse(java.lang.String host) throws java.sql.SQLException
removeHostWhenNotInUse
in interface LoadBalancedConnection
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
isWrapperFor
in class MultiHostMySQLConnection
java.sql.SQLException
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
unwrap
in class MultiHostMySQLConnection
java.sql.SQLException