@Component public class TxcJdbcEventListener extends P6spyJdbcEventListener
| 构造器和说明 |
|---|
TxcJdbcEventListener(SqlExecuteInterceptor sqlExecuteInterceptor) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onAfterExecute(PreparedStatementInformation statementInformation,
long timeElapsedNanos,
SQLException e)
This callback method is executed after any the
PreparedStatement.execute() methods are invoked. |
void |
onAfterExecute(StatementInformation statementInformation,
long timeElapsedNanos,
String sql,
SQLException e)
This callback method is executed after any the
Statement.execute(String) methods are invoked. |
void |
onAfterExecuteUpdate(PreparedStatementInformation statementInformation,
long timeElapsedNanos,
int rowCount,
SQLException e)
This callback method is executed after the
PreparedStatement.executeUpdate() method is invoked. |
void |
onAfterExecuteUpdate(StatementInformation statementInformation,
long timeElapsedNanos,
String sql,
int rowCount,
SQLException e)
This callback method is executed after any of the
Statement.executeUpdate(String) methods are invoked. |
String |
onBeforeAnyExecute(StatementInformation statementInformation)
This callback method is executed before any
Statement.execute* method is invoked |
onAfterAddBatch, onAfterAddBatch, onAfterAnyAddBatch, onAfterAnyExecute, onAfterExecuteBatch, onAfterExecuteQuery, onAfterExecuteQuery, onBeforeAddBatch, onBeforeAddBatch, onBeforeAnyAddBatch, onBeforeExecute, onBeforeExecute, onBeforeExecuteBatch, onBeforeExecuteQuery, onBeforeExecuteQuery, onBeforeExecuteUpdate, onBeforeExecuteUpdateonAfterCallableStatementSet, onAfterCommit, onAfterConnectionClose, onAfterGetConnection, onAfterGetResultSet, onAfterPreparedStatementSet, onAfterResultSetClose, onAfterResultSetGet, onAfterResultSetGet, onAfterResultSetNext, onAfterRollback, onAfterStatementClose, onBeforeCommit, onBeforeGetConnection, onBeforeResultSetNext, onBeforeRollback, onConnectionWrappedpublic TxcJdbcEventListener(SqlExecuteInterceptor sqlExecuteInterceptor)
public String onBeforeAnyExecute(StatementInformation statementInformation) throws SQLException
P6spyJdbcEventListenerStatement.execute* method is invokedonBeforeAnyExecute 在类中 P6spyJdbcEventListenerstatementInformation - The meta information about the Statement being invokedSQLException - SQLExceptionpublic void onAfterExecute(PreparedStatementInformation statementInformation, long timeElapsedNanos, SQLException e)
JdbcEventListenerPreparedStatement.execute() methods are invoked.onAfterExecute 在类中 P6spyJdbcEventListenerstatementInformation - The meta information about the Statement being invokedtimeElapsedNanos - The execution time of the execute calle - The SQLException which may be triggered by the call (null if
there was no exception).public void onAfterExecute(StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
JdbcEventListenerStatement.execute(String) methods are invoked.onAfterExecute 在类中 P6spyJdbcEventListenerstatementInformation - The meta information about the Statement being invokedtimeElapsedNanos - The execution time of the execute callsql - The SQL string provided to the execute methode - The SQLException which may be triggered by the call (null if
there was no exception).public void onAfterExecuteUpdate(PreparedStatementInformation statementInformation, long timeElapsedNanos, int rowCount, SQLException e)
JdbcEventListenerPreparedStatement.executeUpdate() method is invoked.onAfterExecuteUpdate 在类中 P6spyJdbcEventListenerstatementInformation - The meta information about the Statement being invokedtimeElapsedNanos - The execution time of the execute callrowCount - Either the row count for SQL Data Manipulation Language (DML) statements or 0 for SQL
statements that return nothing or if an exception was throwne - The SQLException which may be triggered by the call (null if
there was no exception).public void onAfterExecuteUpdate(StatementInformation statementInformation, long timeElapsedNanos, String sql, int rowCount, SQLException e)
JdbcEventListenerStatement.executeUpdate(String) methods are invoked.onAfterExecuteUpdate 在类中 P6spyJdbcEventListenerstatementInformation - The meta information about the Statement being invokedtimeElapsedNanos - The execution time of the execute callsql - The SQL string provided to the execute methodrowCount - Either the row count for SQL Data Manipulation Language (DML) statements or 0 for SQL
statements that return nothing or if an exception was throwne - The SQLException which may be triggered by the call (null if
there was no exception).Copyright © 2019. All rights reserved.