public class MultiHostMySQLConnection extends java.lang.Object implements JdbcConnection
| Modifier and Type | Field and Description |
|---|---|
protected MultiHostConnectionProxy |
thisAsProxy
thisAsProxy holds the proxy (MultiHostConnectionProxy or one of its subclasses) this connection is associated with.
|
| Constructor and Description |
|---|
MultiHostMySQLConnection(MultiHostConnectionProxy proxy) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(java.util.concurrent.Executor executor) |
void |
abortInternal()
Clobbers the physical network connection and marks this connection as closed.
|
void |
changeUser(java.lang.String userName,
java.lang.String newPassword)
Changes the user on this connection by performing a re-authentication.
|
void |
checkClosed() |
void |
cleanup(java.lang.Throwable whyCleanedUp)
Destroys this connection and any underlying resources.
|
void |
clearHasTriedMaster()
Deprecated.
|
void |
clearWarnings() |
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql)
Prepares a statement on the client, using client-side emulation
(irregardless of the configuration property 'useServerPrepStmts')
with the same semantics as the java.sql.Connection.prepareStatement()
method with the same argument types.
|
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
Prepares a statement on the client, using client-side emulation
(irregardless of the configuration property 'useServerPrepStmts')
with the same semantics as the java.sql.Connection.prepareStatement()
method with the same argument types.
|
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
Prepares a statement on the client, using client-side emulation
(irregardless of the configuration property 'useServerPrepStmts')
with the same semantics as the java.sql.Connection.prepareStatement()
method with the same argument types.
|
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Prepares a statement on the client, using client-side emulation
(irregardless of the configuration property 'useServerPrepStmts')
with the same semantics as the java.sql.Connection.prepareStatement()
method with the same argument types.
|
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Prepares a statement on the client, using client-side emulation
(irregardless of the configuration property 'useServerPrepStmts')
with the same semantics as the java.sql.Connection.prepareStatement()
method with the same argument types.
|
java.sql.PreparedStatement |
clientPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
Prepares a statement on the client, using client-side emulation
(irregardless of the configuration property 'useServerPrepStmts')
with the same semantics as the java.sql.Connection.prepareStatement()
method with the same argument types.
|
void |
close() |
void |
commit() |
java.sql.Array |
createArrayOf(java.lang.String typeName,
java.lang.Object[] elements) |
java.sql.Blob |
createBlob() |
java.sql.Clob |
createClob() |
java.sql.NClob |
createNClob() |
void |
createNewIO(boolean isForReconnect)
Creates an IO channel to the server.
|
java.sql.SQLXML |
createSQLXML() |
java.sql.Statement |
createStatement() |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
java.sql.Struct |
createStruct(java.lang.String typeName,
java.lang.Object[] attributes) |
void |
decachePreparedStatement(JdbcPreparedStatement pstmt) |
JdbcConnection |
getActiveMySQLConnection() |
int |
getActiveStatementCount()
Returns the number of statements active on this connection, which
haven't been .close()d.
|
boolean |
getAutoCommit() |
int |
getAutoIncrementIncrement()
Returns the -session- value of 'auto_increment_increment' from the server if it exists,
or '1' if not.
|
CachedResultSetMetaData |
getCachedMetaData(java.lang.String sql)
Returns cached metadata (or null if not cached) for the given query, which must match _exactly_.
|
java.lang.String |
getCatalog() |
java.lang.String |
getCharacterSetMetadata() |
java.util.Properties |
getClientInfo() |
java.lang.String |
getClientInfo(java.lang.String name) |
ClientInfoProvider |
getClientInfoProviderImpl() |
java.lang.Object |
getConnectionMutex() |
java.lang.String |
getDatabase()
Retrieves this connection object's current database name.
|
ExceptionInterceptor |
getExceptionInterceptor() |
int |
getHoldability() |
java.lang.String |
getHost() |
java.lang.String |
getHostPortPair() |
long |
getId() |
long |
getIdleFor()
Reports how long this connection has been idle.
|
java.sql.DatabaseMetaData |
getMetaData() |
java.sql.Statement |
getMetadataSafeStatement() |
JdbcConnection |
getMultiHostParentProxy() |
JdbcConnection |
getMultiHostSafeProxy() |
int |
getNetworkTimeout() |
java.util.Properties |
getProperties()
Returns the parsed and passed in properties for this connection.
|
JdbcPropertySet |
getPropertySet() |
java.util.List<QueryInterceptor> |
getQueryInterceptorsInstances() |
java.lang.String |
getSchema() |
ServerSessionStateController |
getServerSessionStateController() |
ServerVersion |
getServerVersion() |
Session |
getSession() |
int |
getSessionMaxRows()
Returns the sql select limit max-rows for this session.
|
java.lang.String |
getStatementComment()
Returns the comment that will be prepended to all statements
sent to the server.
|
MultiHostConnectionProxy |
getThisAsProxy() |
int |
getTransactionIsolation() |
java.util.Map<java.lang.String,java.lang.Class<?>> |
getTypeMap() |
java.lang.String |
getURL() |
java.lang.String |
getUser() |
java.sql.SQLWarning |
getWarnings() |
boolean |
hasSameProperties(JdbcConnection c)
Does this connection have the same properties as another?
|
boolean |
hasTriedMaster()
Deprecated.
|
void |
initializeResultsMetadataFromCache(java.lang.String sql,
CachedResultSetMetaData cachedMetaData,
ResultSetInternalMethods resultSet)
Caches CachedResultSetMetaData that has been placed in the cache using the given SQL as a key.
|
void |
initializeSafeQueryInterceptors() |
boolean |
isClosed() |
boolean |
isInGlobalTx()
Is this connection currently a participant in an XA transaction?
|
boolean |
isInPreparedTx()
Is this connection currently in the prepared transaction state?
|
boolean |
isProxySet() |
boolean |
isReadOnly() |
boolean |
isReadOnly(boolean useSessionStatus)
Tests to see if the connection is in Read Only Mode.
|
boolean |
isSameResource(JdbcConnection otherConnection)
Does this connection have the same resource name as the given
connection (for XA)?
|
boolean |
isServerLocal()
Is the server this connection is connected to "local" (i.e.
|
boolean |
isSourceConnection()
Is this connection connected to the first host in the list if
there is a list of servers in the URL?
|
boolean |
isValid(int timeout) |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
boolean |
lowerCaseTableNames()
Is the server configured to use lower-case table names only?
|
java.lang.String |
nativeSQL(java.lang.String sql) |
void |
normalClose() |
void |
ping()
Detect if the connection is still good by sending a ping command
to the server.
|
void |
pingInternal(boolean checkForClosedConnection,
int timeoutMillis) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGenKeyIndex) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames) |
void |
realClose(boolean calledExplicitly,
boolean issueRollback,
boolean skipLocalTeardown,
java.lang.Throwable reason)
Closes connection and frees resources.
|
void |
recachePreparedStatement(JdbcPreparedStatement pstmt) |
void |
registerStatement(JdbcStatement stmt)
Register a Statement instance as open.
|
void |
releaseSavepoint(java.sql.Savepoint arg0) |
void |
resetServerState()
Resets the server-side state of this connection.
|
void |
rollback() |
void |
rollback(java.sql.Savepoint savepoint) |
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql)
Prepares a statement on the server (irregardless of the
configuration property 'useServerPrepStmts') with the same semantics
as the java.sql.Connection.prepareStatement() method with the
same argument types.
|
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
Prepares a statement on the server (irregardless of the
configuration property 'useServerPrepStmts') with the same semantics
as the java.sql.Connection.prepareStatement() method with the
same argument types.
|
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
Prepares a statement on the server (irregardless of the
configuration property 'useServerPrepStmts') with the same semantics
as the java.sql.Connection.prepareStatement() method with the
same argument types.
|
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Prepares a statement on the server (irregardless of the
configuration property 'useServerPrepStmts') with the same semantics
as the java.sql.Connection.prepareStatement() method with the
same argument types.
|
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Prepares a statement on the server (irregardless of the
configuration property 'useServerPrepStmts') with the same semantics
as the java.sql.Connection.prepareStatement() method with the
same argument types.
|
java.sql.PreparedStatement |
serverPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
Prepares a statement on the server (irregardless of the
configuration property 'useServerPrepStmts') with the same semantics
as the java.sql.Connection.prepareStatement() method with the
same argument types.
|
void |
setAutoCommit(boolean autoCommitFlag) |
void |
setCatalog(java.lang.String catalog) |
void |
setClientInfo(java.util.Properties properties) |
void |
setClientInfo(java.lang.String name,
java.lang.String value) |
void |
setConnectionLifecycleInterceptor(ConnectionLifecycleInterceptor interceptor) |
void |
setDatabase(java.lang.String dbName)
Set current database for this connection.
|
void |
setFailedOver(boolean flag) |
void |
setHoldability(int arg0) |
void |
setInGlobalTx(boolean flag)
Set the state of being in a global (XA) transaction.
|
void |
setInPreparedTx(boolean flag)
Set the state of being in a prepared transaction.
|
void |
setNetworkTimeout(java.util.concurrent.Executor executor,
int milliseconds) |
void |
setProxy(JdbcConnection proxy) |
void |
setReadOnly(boolean readOnlyFlag) |
void |
setReadOnlyInternal(boolean readOnlyFlag) |
java.sql.Savepoint |
setSavepoint() |
java.sql.Savepoint |
setSavepoint(java.lang.String name) |
void |
setSchema(java.lang.String schema) |
void |
setSessionMaxRows(int max)
Sets the sql select limit max-rows for this session if different from current.
|
void |
setStatementComment(java.lang.String comment)
Sets the comment that will be prepended to all statements
sent to the server.
|
void |
setTransactionIsolation(int level) |
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map) |
void |
shutdownServer()
Used by MiniAdmin to shutdown a MySQL server
|
boolean |
storesLowerCaseTableName() |
void |
throwConnectionClosedException() |
void |
transactionBegun() |
void |
transactionCompleted() |
void |
unregisterStatement(JdbcStatement stmt)
Remove the given statement from the list of open statements
|
void |
unSafeQueryInterceptors() |
<T> T |
unwrap(java.lang.Class<T> iface) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisMasterConnectionprotected MultiHostConnectionProxy thisAsProxy
public MultiHostMySQLConnection(MultiHostConnectionProxy proxy)
public MultiHostConnectionProxy getThisAsProxy()
public JdbcConnection getActiveMySQLConnection()
getActiveMySQLConnection in interface JdbcConnectionpublic void abortInternal()
throws java.sql.SQLException
JdbcConnectionabortInternal in interface JdbcConnectionjava.sql.SQLException - if an error occurspublic void changeUser(java.lang.String userName,
java.lang.String newPassword)
throws java.sql.SQLException
JdbcConnectionchangeUser in interface JdbcConnectionuserName - the username to authenticate withnewPassword - the password to authenticate withjava.sql.SQLException - if authentication fails, or some other error occurs while
performing the command.public void checkClosed()
checkClosed in interface MysqlConnection@Deprecated public void clearHasTriedMaster()
clearHasTriedMaster in interface JdbcConnectionpublic void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
JdbcConnectionclientPrepareStatement in interface JdbcConnectionsql - statementresultSetType - resultSetTyperesultSetConcurrency - resultSetConcurrencyresultSetHoldability - resultSetHoldabilityjava.sql.SQLException - if an error occursConnection.prepareStatement(String, int, int, int)public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
JdbcConnectionclientPrepareStatement in interface JdbcConnectionsql - statementresultSetType - resultSetTyperesultSetConcurrency - resultSetConcurrencyjava.sql.SQLException - if an error occursConnection.prepareStatement(String, int, int)public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
throws java.sql.SQLException
JdbcConnectionclientPrepareStatement in interface JdbcConnectionsql - statementautoGenKeyIndex - autoGenKeyIndexjava.sql.SQLException - if an error occursConnection.prepareStatement(String, int)public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
throws java.sql.SQLException
JdbcConnectionclientPrepareStatement in interface JdbcConnectionsql - statementautoGenKeyIndexes - autoGenKeyIndexesjava.sql.SQLException - if an error occursConnection.prepareStatement(String, int[])public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
throws java.sql.SQLException
JdbcConnectionclientPrepareStatement in interface JdbcConnectionsql - statementautoGenKeyColNames - autoGenKeyColNamesjava.sql.SQLException - if an error occursConnection.prepareStatement(String, String[])public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql)
throws java.sql.SQLException
JdbcConnectionclientPrepareStatement in interface JdbcConnectionsql - statementjava.sql.SQLException - if an error occursConnection.prepareStatement(String)public void close()
throws java.sql.SQLException
close in interface java.lang.AutoCloseableclose in interface java.sql.Connectionjava.sql.SQLExceptionpublic void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectionjava.sql.SQLExceptionpublic void createNewIO(boolean isForReconnect)
MysqlConnectioncreateNewIO in interface MysqlConnectionisForReconnect - is this request for a re-connectpublic java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic int getActiveStatementCount()
JdbcConnectiongetActiveStatementCount in interface JdbcConnectionpublic boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.Connectionjava.sql.SQLExceptionpublic int getAutoIncrementIncrement()
JdbcConnectiongetAutoIncrementIncrement in interface JdbcConnectionpublic CachedResultSetMetaData getCachedMetaData(java.lang.String sql)
JdbcConnectiongetCachedMetaData in interface JdbcConnectionsql - the query that is the key to the cachepublic java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.String getCharacterSetMetadata()
getCharacterSetMetadata in interface JdbcConnectionpublic ExceptionInterceptor getExceptionInterceptor()
getExceptionInterceptor in interface MysqlConnectionpublic int getHoldability()
throws java.sql.SQLException
getHoldability in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.String getHost()
getHost in interface JdbcConnectionpublic long getId()
getId in interface MysqlConnectionpublic long getIdleFor()
JdbcConnectiongetIdleFor in interface JdbcConnectionpublic JdbcConnection getMultiHostSafeProxy()
getMultiHostSafeProxy in interface JdbcConnectionpublic JdbcConnection getMultiHostParentProxy()
getMultiHostParentProxy in interface JdbcConnectionpublic java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Statement getMetadataSafeStatement()
throws java.sql.SQLException
getMetadataSafeStatement in interface JdbcConnectionjava.sql.SQLExceptionpublic java.util.Properties getProperties()
MysqlConnectiongetProperties in interface MysqlConnectionPropertiespublic ServerVersion getServerVersion()
getServerVersion in interface JdbcConnectionpublic Session getSession()
getSession in interface MysqlConnectionpublic java.lang.String getStatementComment()
JdbcConnectiongetStatementComment in interface JdbcConnectionpublic java.util.List<QueryInterceptor> getQueryInterceptorsInstances()
getQueryInterceptorsInstances in interface JdbcConnectionpublic int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
throws java.sql.SQLException
getTypeMap in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.String getURL()
getURL in interface MysqlConnectionpublic java.lang.String getUser()
getUser in interface MysqlConnectionpublic java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Connectionjava.sql.SQLExceptionpublic boolean hasSameProperties(JdbcConnection c)
JdbcConnectionhasSameProperties in interface JdbcConnectionc - connection@Deprecated public boolean hasTriedMaster()
JdbcConnectionhasTriedMaster in interface JdbcConnectionpublic void initializeResultsMetadataFromCache(java.lang.String sql,
CachedResultSetMetaData cachedMetaData,
ResultSetInternalMethods resultSet)
throws java.sql.SQLException
JdbcConnectioninitializeResultsMetadataFromCache in interface JdbcConnectionsql - the query that the metadata pertains too.cachedMetaData - metadata (if it exists) to populate the cache.resultSet - the result set to retreive metadata from, or apply to.java.sql.SQLException - if an error occurspublic void initializeSafeQueryInterceptors()
throws java.sql.SQLException
initializeSafeQueryInterceptors in interface JdbcConnectionjava.sql.SQLExceptionpublic void setConnectionLifecycleInterceptor(ConnectionLifecycleInterceptor interceptor)
setConnectionLifecycleInterceptor in interface JdbcConnectionpublic boolean isInGlobalTx()
JdbcConnectionisInGlobalTx in interface JdbcConnectionpublic boolean isInPreparedTx()
JdbcConnectionisInPreparedTx in interface JdbcConnectionpublic boolean isSourceConnection()
JdbcConnectionisSourceConnection in interface JdbcConnectionpublic boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface java.sql.Connectionjava.sql.SQLExceptionpublic boolean isReadOnly(boolean useSessionStatus)
throws java.sql.SQLException
JdbcConnectionisReadOnly in interface JdbcConnectionuseSessionStatus - in some cases, for example when restoring connection with autoReconnect=true,
we can rely only on saved readOnly state, so use useSessionStatus=false in that casejava.sql.SQLException - if a database access error occurspublic boolean isSameResource(JdbcConnection otherConnection)
JdbcConnectionisSameResource in interface JdbcConnectionotherConnection - connectionpublic boolean lowerCaseTableNames()
JdbcConnectionlowerCaseTableNames in interface JdbcConnectionpublic java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
nativeSQL in interface java.sql.Connectionjava.sql.SQLExceptionpublic void ping()
throws java.sql.SQLException
JdbcConnectionping in interface JdbcConnectionjava.sql.SQLException - if the ping failspublic void pingInternal(boolean checkForClosedConnection,
int timeoutMillis)
throws java.sql.SQLException
pingInternal in interface JdbcConnectionjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGenKeyIndex)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic void realClose(boolean calledExplicitly,
boolean issueRollback,
boolean skipLocalTeardown,
java.lang.Throwable reason)
throws java.sql.SQLException
JdbcConnectionrealClose in interface JdbcConnectioncalledExplicitly - is this being called from close()issueRollback - should a rollback() be issued?skipLocalTeardown - if true, driver tries to close connection normally, performing rollbacks,
closing open statements etc; otherwise the force close is performedreason - the exception caused this method calljava.sql.SQLException - if an error occurspublic void recachePreparedStatement(JdbcPreparedStatement pstmt) throws java.sql.SQLException
recachePreparedStatement in interface JdbcConnectionjava.sql.SQLExceptionpublic void decachePreparedStatement(JdbcPreparedStatement pstmt) throws java.sql.SQLException
decachePreparedStatement in interface JdbcConnectionjava.sql.SQLExceptionpublic void registerStatement(JdbcStatement stmt)
JdbcConnectionregisterStatement in interface JdbcConnectionstmt - the Statement instance to removepublic void releaseSavepoint(java.sql.Savepoint arg0)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.Connectionjava.sql.SQLExceptionpublic void resetServerState()
throws java.sql.SQLException
JdbcConnectionresetServerState in interface JdbcConnectionjava.sql.SQLException - if the operation fails while resetting server state.public void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLExceptionpublic void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
JdbcConnectionserverPrepareStatement in interface JdbcConnectionsql - statementresultSetType - resultSetTyperesultSetConcurrency - resultSetConcurrencyresultSetHoldability - resultSetHoldabilityjava.sql.SQLException - if an error occursConnection.prepareStatement(String, int, int, int)public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
JdbcConnectionserverPrepareStatement in interface JdbcConnectionsql - statementresultSetType - resultSetTyperesultSetConcurrency - resultSetConcurrencyjava.sql.SQLException - if an error occursConnection.prepareStatement(String, int, int)public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
throws java.sql.SQLException
JdbcConnectionserverPrepareStatement in interface JdbcConnectionsql - statementautoGenKeyIndex - autoGenKeyIndexjava.sql.SQLException - if an error occursConnection.prepareStatement(String, int)public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
throws java.sql.SQLException
JdbcConnectionserverPrepareStatement in interface JdbcConnectionsql - statementautoGenKeyIndexes - autoGenKeyIndexesjava.sql.SQLException - if an error occursConnection.prepareStatement(String, int[])public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
throws java.sql.SQLException
JdbcConnectionserverPrepareStatement in interface JdbcConnectionsql - statementautoGenKeyColNames - autoGenKeyColNamesjava.sql.SQLException - if an error occursConnection.prepareStatement(String, String[])public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql)
throws java.sql.SQLException
JdbcConnectionserverPrepareStatement in interface JdbcConnectionsql - statementjava.sql.SQLException - if an error occursConnection.prepareStatement(String)public void setAutoCommit(boolean autoCommitFlag)
throws java.sql.SQLException
setAutoCommit in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setDatabase(java.lang.String dbName)
throws java.sql.SQLException
JdbcConnectionsetDatabase in interface JdbcConnectiondbName - the database for this connection to usejava.sql.SQLException - if a database access error occurspublic java.lang.String getDatabase()
throws java.sql.SQLException
JdbcConnectiongetDatabase in interface JdbcConnectionjava.sql.SQLException - if an error occurspublic void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
setCatalog in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setFailedOver(boolean flag)
setFailedOver in interface JdbcConnectionflag - The failedOver flag to set.public void setHoldability(int arg0)
throws java.sql.SQLException
setHoldability in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setInGlobalTx(boolean flag)
JdbcConnectionsetInGlobalTx in interface JdbcConnectionflag - the state flagpublic void setInPreparedTx(boolean flag)
JdbcConnectionsetInPreparedTx in interface JdbcConnectionflag - the state flagpublic void setProxy(JdbcConnection proxy)
setProxy in interface JdbcConnectionpublic void setReadOnly(boolean readOnlyFlag)
throws java.sql.SQLException
setReadOnly in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setReadOnlyInternal(boolean readOnlyFlag)
throws java.sql.SQLException
setReadOnlyInternal in interface JdbcConnectionjava.sql.SQLExceptionpublic java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setStatementComment(java.lang.String comment)
JdbcConnectionsetStatementComment in interface JdbcConnectioncomment - the comment that will be prepended to all statements
sent to the server.public void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.Connectionjava.sql.SQLExceptionpublic void shutdownServer()
throws java.sql.SQLException
JdbcConnectionshutdownServer in interface JdbcConnectionjava.sql.SQLException - if the command can not be issued.public boolean storesLowerCaseTableName()
storesLowerCaseTableName in interface JdbcConnectionpublic void throwConnectionClosedException()
throws java.sql.SQLException
throwConnectionClosedException in interface JdbcConnectionjava.sql.SQLExceptionpublic void transactionBegun()
transactionBegun in interface TransactionEventHandlerpublic void transactionCompleted()
transactionCompleted in interface TransactionEventHandlerpublic void unregisterStatement(JdbcStatement stmt)
JdbcConnectionunregisterStatement in interface JdbcConnectionstmt - the Statement instance to removepublic void unSafeQueryInterceptors()
throws java.sql.SQLException
unSafeQueryInterceptors in interface JdbcConnectionjava.sql.SQLExceptionpublic boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Connectionjava.sql.SQLExceptionpublic boolean isProxySet()
isProxySet in interface JdbcConnectionpublic void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
setTypeMap in interface java.sql.Connectionjava.sql.SQLExceptionpublic boolean isServerLocal()
throws java.sql.SQLException
JdbcConnectionisServerLocal in interface JdbcConnectionjava.sql.SQLException - if an error occurspublic void setSchema(java.lang.String schema)
throws java.sql.SQLException
setSchema in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.String getSchema()
throws java.sql.SQLException
getSchema in interface java.sql.Connectionjava.sql.SQLExceptionpublic void abort(java.util.concurrent.Executor executor)
throws java.sql.SQLException
abort in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setNetworkTimeout(java.util.concurrent.Executor executor,
int milliseconds)
throws java.sql.SQLException
setNetworkTimeout in interface java.sql.Connectionjava.sql.SQLExceptionpublic int getNetworkTimeout()
throws java.sql.SQLException
getNetworkTimeout in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.Object getConnectionMutex()
getConnectionMutex in interface MysqlConnectionpublic int getSessionMaxRows()
JdbcConnectiongetSessionMaxRows in interface JdbcConnectionpublic void setSessionMaxRows(int max)
throws java.sql.SQLException
JdbcConnectionsetSessionMaxRows in interface JdbcConnectionmax - the new max-rows value to set.java.sql.SQLException - if a database error occurs issuing the statement that sets the limit.public java.sql.SQLXML createSQLXML()
throws java.sql.SQLException
createSQLXML in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Array createArrayOf(java.lang.String typeName,
java.lang.Object[] elements)
throws java.sql.SQLException
createArrayOf in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Struct createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
throws java.sql.SQLException
createStruct in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.util.Properties getClientInfo()
throws java.sql.SQLException
getClientInfo in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.String getClientInfo(java.lang.String name)
throws java.sql.SQLException
getClientInfo in interface java.sql.Connectionjava.sql.SQLExceptionpublic boolean isValid(int timeout)
throws java.sql.SQLException
isValid in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setClientInfo(java.util.Properties properties)
throws java.sql.SQLClientInfoException
setClientInfo in interface java.sql.Connectionjava.sql.SQLClientInfoExceptionpublic void setClientInfo(java.lang.String name,
java.lang.String value)
throws java.sql.SQLClientInfoException
setClientInfo in interface java.sql.Connectionjava.sql.SQLClientInfoExceptionpublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLExceptionpublic java.sql.Blob createBlob()
throws java.sql.SQLException
createBlob in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Clob createClob()
throws java.sql.SQLException
createClob in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.NClob createNClob()
throws java.sql.SQLException
createNClob in interface java.sql.Connectionjava.sql.SQLExceptionpublic ClientInfoProvider getClientInfoProviderImpl() throws java.sql.SQLException
getClientInfoProviderImpl in interface JdbcConnectionjava.sql.SQLExceptionpublic JdbcPropertySet getPropertySet()
getPropertySet in interface JdbcConnectiongetPropertySet in interface MysqlConnectionpublic java.lang.String getHostPortPair()
getHostPortPair in interface JdbcConnectionpublic void normalClose()
normalClose in interface MysqlConnectionpublic void cleanup(java.lang.Throwable whyCleanedUp)
MysqlConnectioncleanup in interface MysqlConnectionwhyCleanedUp - exception caused the connection clean uppublic ServerSessionStateController getServerSessionStateController()
getServerSessionStateController in interface MysqlConnection