public class DefaultEventListener extends JdbcEventListener
JdbcEventListener must always be applied as the first listener.
It populates the information objects StatementInformation, PreparedStatementInformation,
ResultSetInformation| 限定符和类型 | 字段和说明 |
|---|---|
static DefaultEventListener |
INSTANCE |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onAfterAddBatch(StatementInformation statementInformation,
long timeElapsedNanos,
String sql,
SQLException e)
This callback method is executed after the
Statement.addBatch(String) or
Statement.addBatch(String) method is invoked. |
void |
onAfterCallableStatementSet(CallableStatementInformation statementInformation,
String parameterName,
Object value,
SQLException e)
This callback method is executed after any of the
CallableStatement.set* methods are invoked. |
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 |
onAfterExecuteBatch(StatementInformation statementInformation,
long timeElapsedNanos,
int[] updateCounts,
SQLException e)
This callback method is executed after the
Statement.executeBatch() method is invoked. |
void |
onAfterExecuteQuery(PreparedStatementInformation statementInformation,
long timeElapsedNanos,
SQLException e)
This callback method is executed after the
PreparedStatement.executeQuery() method is invoked. |
void |
onAfterExecuteQuery(StatementInformation statementInformation,
long timeElapsedNanos,
String sql,
SQLException e)
This callback method is executed after the
Statement.executeQuery(String) method is 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. |
void |
onAfterGetResultSet(StatementInformation statementInformation,
long timeElapsedNanos,
SQLException e)
This callback method is executed after the
Statement.getResultSet() method is invoked. |
void |
onAfterPreparedStatementSet(PreparedStatementInformation statementInformation,
int parameterIndex,
Object value,
SQLException e)
This callback method is executed after any of the
PreparedStatement.set* methods are invoked. |
void |
onAfterResultSetNext(ResultSetInformation resultSetInformation,
long timeElapsedNanos,
boolean hasNext,
SQLException e)
This callback method is executed after the
ResultSet.next() method is invoked. |
onAfterAddBatch, onAfterCommit, onAfterConnectionClose, onAfterGetConnection, onAfterResultSetClose, onAfterResultSetGet, onAfterResultSetGet, onAfterRollback, onAfterStatementClose, onBeforeAddBatch, onBeforeAddBatch, onBeforeCommit, onBeforeExecute, onBeforeExecute, onBeforeExecuteBatch, onBeforeExecuteQuery, onBeforeExecuteQuery, onBeforeExecuteUpdate, onBeforeExecuteUpdate, onBeforeGetConnection, onBeforeResultSetNext, onBeforeRollback, onConnectionWrappedpublic static final DefaultEventListener INSTANCE
public void onAfterAddBatch(StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
JdbcEventListenerStatement.addBatch(String) or
Statement.addBatch(String) method is invoked.onAfterAddBatch 在类中 JdbcEventListenerstatementInformation - 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 onAfterExecute(PreparedStatementInformation statementInformation, long timeElapsedNanos, SQLException e)
JdbcEventListenerPreparedStatement.execute() methods are invoked.onAfterExecute 在类中 JdbcEventListenerstatementInformation - 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 在类中 JdbcEventListenerstatementInformation - 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 onAfterExecuteBatch(StatementInformation statementInformation, long timeElapsedNanos, int[] updateCounts, SQLException e)
JdbcEventListenerStatement.executeBatch() method is invoked.onAfterExecuteBatch 在类中 JdbcEventListenerstatementInformation - The meta information about the Statement being invokedtimeElapsedNanos - The execution time of the execute callupdateCounts - An array of update counts or null if an exception was throwne - 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 在类中 JdbcEventListenerstatementInformation - 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 在类中 JdbcEventListenerstatementInformation - 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).public void onAfterExecuteQuery(PreparedStatementInformation statementInformation, long timeElapsedNanos, SQLException e)
JdbcEventListenerPreparedStatement.executeQuery() method is invoked.onAfterExecuteQuery 在类中 JdbcEventListenerstatementInformation - 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 onAfterExecuteQuery(StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
JdbcEventListenerStatement.executeQuery(String) method is invoked.onAfterExecuteQuery 在类中 JdbcEventListenerstatementInformation - 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 onAfterGetResultSet(StatementInformation statementInformation, long timeElapsedNanos, SQLException e)
JdbcEventListenerStatement.getResultSet() method is invoked.onAfterGetResultSet 在类中 JdbcEventListenerstatementInformation - 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 onAfterResultSetNext(ResultSetInformation resultSetInformation, long timeElapsedNanos, boolean hasNext, SQLException e)
JdbcEventListenerResultSet.next() method is invoked.onAfterResultSetNext 在类中 JdbcEventListenerresultSetInformation - The meta information about the ResultSet being invokedtimeElapsedNanos - The execution time of the execute callhasNext - The return value of ResultSet.next()e - The SQLException which may be triggered by the call (null if
there was no exception).public void onAfterCallableStatementSet(CallableStatementInformation statementInformation, String parameterName, Object value, SQLException e)
JdbcEventListenerCallableStatement.set* methods are invoked.onAfterCallableStatementSet 在类中 JdbcEventListenerstatementInformation - The meta information about the Statement being invokedparameterName - The name of the parametervalue - the column value; if the value is SQL NULL, the value returned is nulle - The SQLException which may be triggered by the call (null if
there was no exception).public void onAfterPreparedStatementSet(PreparedStatementInformation statementInformation, int parameterIndex, Object value, SQLException e)
JdbcEventListenerPreparedStatement.set* methods are invoked.onAfterPreparedStatementSet 在类中 JdbcEventListenerstatementInformation - The meta information about the Statement being invokedparameterIndex - The first parameter is 1, the second is 2, ...value - the column value; if the value is SQL NULL, the value returned is nulle - The SQLException which may be triggered by the call (null if
there was no exception).Copyright © 2019. All rights reserved.