| |
|
| java.lang.Object com.mysql.jdbc.ConnectionPropertiesImpl com.mysql.jdbc.ConnectionImpl com.mysql.jdbc.JDBC4Connection
isValid | public synchronized boolean isValid(int timeout) throws SQLException(Code) | | Returns true if the connection has not been closed and is still valid.
The driver shall submit a query on the connection or use some other
mechanism that positively verifies the connection is still valid when
this method is called.
The query submitted by the driver to validate the connection shall be
executed in the context of the current transaction.
Parameters: timeout - - The time in seconds to wait for the database operation used to validate the connection to complete. If the timeout period expires before the operation completes, this method returns false. A value of 0 indicates a timeout is not applied to the database operation. true if the connection is valid, false otherwise exception: SQLException - if the value supplied for timeout is less then 0 since: 1.6 |
isWrapperFor | public boolean isWrapperFor(Class> iface) throws SQLException(Code) | | Returns true if this either implements the interface argument or is directly or indirectly a wrapper
for an object that does. Returns false otherwise. If this implements the interface then return true,
else if this is a wrapper then return the result of recursively calling isWrapperFor on the wrapped
object. If this does not implement the interface and is not a wrapper, return false.
This method should be implemented as a low-cost operation compared to unwrap so that
callers can use this method to avoid expensive unwrap calls that may fail. If this method
returns true then calling unwrap with the same argument should succeed.
Parameters: interfaces - a Class defining an interface. true if this implements the interface or directly or indirectly wraps an object that does. throws: java.sql.SQLException - if an error occurs while determining whether this is a wrapperfor an object with the given interface. since: 1.6 |
unwrap | public T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException(Code) | | Returns an object that implements the given interface to allow access to non-standard methods,
or standard methods not exposed by the proxy.
The result may be either the object found to implement the interface or a proxy for that object.
If the receiver implements the interface then that is the object. If the receiver is a wrapper
and the wrapped object implements the interface then that is the object. Otherwise the object is
the result of calling unwrap recursively on the wrapped object. If the receiver is not a
wrapper and does not implement the interface, then an SQLException is thrown.
Parameters: iface - A Class defining an interface that the result must implement. an object that implements the interface. May be a proxy for the actual implementing object. throws: java.sql.SQLException - If no object found that implements the interface since: 1.6 |
Methods inherited from com.mysql.jdbc.ConnectionImpl | protected void abortInternal() throws SQLException(Code)(Java Doc) protected static SQLException appendMessageToException(SQLException sqlEx, String messageToAppend)(Code)(Java Doc) public void changeUser(String userName, String newPassword) throws SQLException(Code)(Java Doc) protected void checkClosed() throws SQLException(Code)(Java Doc) public void clearHasTriedMaster()(Code)(Java Doc) public void clearWarnings() throws SQLException(Code)(Java Doc) public PreparedStatement clientPrepareStatement(String sql) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement clientPrepareStatement(String sql, int autoGenKeyIndex) throws SQLException(Code)(Java Doc) public PreparedStatement clientPrepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) protected PreparedStatement clientPrepareStatement(String sql, int resultSetType, int resultSetConcurrency, boolean processEscapeCodesIfNeeded) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement clientPrepareStatement(String sql, int[] autoGenKeyIndexes) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement clientPrepareStatement(String sql, String[] autoGenKeyColNames) throws SQLException(Code)(Java Doc) public void close() throws SQLException(Code)(Java Doc) public void commit() throws SQLException(Code)(Java Doc) protected void createNewIO(boolean isForReconnect) throws SQLException(Code)(Java Doc) public java.sql.Statement createStatement() throws SQLException(Code)(Java Doc) public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code)(Java Doc) protected void dumpTestcaseQuery(String query)(Code)(Java Doc) protected Connection duplicate() throws SQLException(Code)(Java Doc) ResultSetInternalMethods execSQL(StatementImpl callingStatement, String sql, int maxRows, Buffer packet, int resultSetType, int resultSetConcurrency, boolean streamResults, String catalog, Field[] cachedMetadata) throws SQLException(Code)(Java Doc) ResultSetInternalMethods execSQL(StatementImpl callingStatement, String sql, int maxRows, Buffer packet, int resultSetType, int resultSetConcurrency, boolean streamResults, String catalog, Field[] cachedMetadata, boolean isBatch) throws SQLException(Code)(Java Doc) protected String extractSqlFromPacket(String possibleSqlQuery, Buffer queryPacket, int endOfQueryPacketPosition) throws SQLException(Code)(Java Doc) protected void finalize() throws Throwable(Code)(Java Doc) protected StringBuffer generateConnectionCommentBlock(StringBuffer buf)(Code)(Java Doc) public int getActiveStatementCount()(Code)(Java Doc) public boolean getAutoCommit() throws SQLException(Code)(Java Doc) protected CachedResultSetMetaData getCachedMetaData(String sql)(Code)(Java Doc) protected Calendar getCalendarInstanceForSessionOrNew()(Code)(Java Doc) protected static Timer getCancelTimer()(Code)(Java Doc) public String getCatalog() throws SQLException(Code)(Java Doc) protected String getCharacterSetMetadata()(Code)(Java Doc) SingleByteCharsetConverter getCharsetConverter(String javaEncodingName) throws SQLException(Code)(Java Doc) protected String getCharsetNameForIndex(int charsetIndex) throws SQLException(Code)(Java Doc) protected TimeZone getDefaultTimeZone()(Code)(Java Doc) protected String getErrorMessageEncoding()(Code)(Java Doc) public int getHoldability() throws SQLException(Code)(Java Doc) protected MysqlIO getIO() throws SQLException(Code)(Java Doc) long getId()(Code)(Java Doc) public long getIdleFor()(Code)(Java Doc) protected static Connection getInstance(String hostToConnectTo, int portToConnectTo, Properties info, String databaseToConnectTo, String url) throws SQLException(Code)(Java Doc) public Log getLog() throws SQLException(Code)(Java Doc) int getMaxAllowedPacket()(Code)(Java Doc) protected int getMaxBytesPerChar(String javaCharsetName) throws SQLException(Code)(Java Doc) public java.sql.DatabaseMetaData getMetaData() throws SQLException(Code)(Java Doc) protected java.sql.Statement getMetadataSafeStatement() throws SQLException(Code)(Java Doc) Object getMutex() throws SQLException(Code)(Java Doc) int getNetBufferLength()(Code)(Java Doc) public String getServerCharacterEncoding()(Code)(Java Doc) int getServerMajorVersion()(Code)(Java Doc) int getServerMinorVersion()(Code)(Java Doc) int getServerSubMinorVersion()(Code)(Java Doc) public TimeZone getServerTimezoneTZ()(Code)(Java Doc) String getServerVariable(String variableName)(Code)(Java Doc) String getServerVersion()(Code)(Java Doc) protected Calendar getSessionLockedCalendar()(Code)(Java Doc) public String getStatementComment()(Code)(Java Doc) public int getTransactionIsolation() throws SQLException(Code)(Java Doc) public synchronized java.util.Map getTypeMap() throws SQLException(Code)(Java Doc) String getURL()(Code)(Java Doc) String getUser()(Code)(Java Doc) protected Calendar getUtcCalendar()(Code)(Java Doc) public SQLWarning getWarnings() throws SQLException(Code)(Java Doc) public boolean hasSameProperties(Connection c)(Code)(Java Doc) public boolean hasTriedMaster()(Code)(Java Doc) protected void incrementNumberOfPreparedExecutes()(Code)(Java Doc) protected void incrementNumberOfPrepares()(Code)(Java Doc) protected void incrementNumberOfResultSetsCreated()(Code)(Java Doc) protected void initializeResultsMetadataFromCache(String sql, CachedResultSetMetaData cachedMetaData, ResultSetInternalMethods resultSet) throws SQLException(Code)(Java Doc) protected boolean isClientTzUTC()(Code)(Java Doc) public boolean isClosed()(Code)(Java Doc) protected boolean isCursorFetchEnabled() throws SQLException(Code)(Java Doc) public boolean isInGlobalTx()(Code)(Java Doc) public synchronized boolean isMasterConnection()(Code)(Java Doc) public boolean isNoBackslashEscapesSet()(Code)(Java Doc) boolean isReadInfoMsgEnabled()(Code)(Java Doc) public boolean isReadOnly() throws SQLException(Code)(Java Doc) protected boolean isRunningOnJDK13()(Code)(Java Doc) public synchronized boolean isSameResource(Connection otherConnection)(Code)(Java Doc) protected boolean isServerTzUTC()(Code)(Java Doc) public boolean lowerCaseTableNames()(Code)(Java Doc) void maxRowsChanged(StatementImpl stmt)(Code)(Java Doc) public String nativeSQL(String sql) throws SQLException(Code)(Java Doc) public boolean parserKnowsUnicode()(Code)(Java Doc) public void ping() throws SQLException(Code)(Java Doc) protected void pingInternal(boolean checkForClosedConnection) throws SQLException(Code)(Java Doc) public java.sql.CallableStatement prepareCall(String sql) throws SQLException(Code)(Java Doc) public java.sql.CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public java.sql.CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql, int autoGenKeyIndex) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql, int[] autoGenKeyIndexes) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement prepareStatement(String sql, String[] autoGenKeyColNames) throws SQLException(Code)(Java Doc) protected void realClose(boolean calledExplicitly, boolean issueRollback, boolean skipLocalTeardown, Throwable reason) throws SQLException(Code)(Java Doc) protected void recachePreparedStatement(ServerPreparedStatement pstmt) throws SQLException(Code)(Java Doc) protected void registerQueryExecutionTime(long queryTimeMs)(Code)(Java Doc) void registerStatement(StatementImpl stmt)(Code)(Java Doc) public void releaseSavepoint(Savepoint arg0) throws SQLException(Code)(Java Doc) protected void reportNumberOfTablesAccessed(int numTablesAccessed)(Code)(Java Doc) public void resetServerState() throws SQLException(Code)(Java Doc) public void rollback() throws SQLException(Code)(Java Doc) public void rollback(Savepoint savepoint) throws SQLException(Code)(Java Doc) public ServerPreparedStatement serverPrepareStatement(String sql) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement serverPrepareStatement(String sql, int autoGenKeyIndex) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement serverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement serverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement serverPrepareStatement(String sql, int[] autoGenKeyIndexes) throws SQLException(Code)(Java Doc) public java.sql.PreparedStatement serverPrepareStatement(String sql, String[] autoGenKeyColNames) throws SQLException(Code)(Java Doc) protected boolean serverSupportsConvertFn() throws SQLException(Code)(Java Doc) public void setAutoCommit(boolean autoCommitFlag) throws SQLException(Code)(Java Doc) public void setCatalog(String catalog) throws SQLException(Code)(Java Doc) public synchronized void setFailedOver(boolean flag)(Code)(Java Doc) public void setHoldability(int arg0) throws SQLException(Code)(Java Doc) public void setInGlobalTx(boolean flag)(Code)(Java Doc) public void setPreferSlaveDuringFailover(boolean flag)(Code)(Java Doc) void setReadInfoMsgEnabled(boolean flag)(Code)(Java Doc) public void setReadOnly(boolean readOnlyFlag) throws SQLException(Code)(Java Doc) protected void setReadOnlyInternal(boolean readOnlyFlag) throws SQLException(Code)(Java Doc) public java.sql.Savepoint setSavepoint() throws SQLException(Code)(Java Doc) public synchronized java.sql.Savepoint setSavepoint(String name) throws SQLException(Code)(Java Doc) public void setStatementComment(String comment)(Code)(Java Doc) public synchronized void setTransactionIsolation(int level) throws SQLException(Code)(Java Doc) public synchronized void setTypeMap(java.util.Map map) throws SQLException(Code)(Java Doc) public void shutdownServer() throws SQLException(Code)(Java Doc) public boolean supportsIsolationLevel()(Code)(Java Doc) public boolean supportsQuotedIdentifiers()(Code)(Java Doc) public boolean supportsTransactions()(Code)(Java Doc) void unregisterStatement(StatementImpl stmt)(Code)(Java Doc) void unsetMaxRows(StatementImpl stmt) throws SQLException(Code)(Java Doc) boolean useAnsiQuotedIdentifiers()(Code)(Java Doc) boolean useMaxRows()(Code)(Java Doc) public boolean versionMeetsMinimum(int major, int minor, int subminor) throws SQLException(Code)(Java Doc)
|
|
|
|