Class ResetAbandonedTimer
java.lang.Object
org.apache.tomcat.jdbc.pool.JdbcInterceptor
org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor
org.apache.tomcat.jdbc.pool.interceptor.AbstractQueryReport
org.apache.tomcat.jdbc.pool.interceptor.ResetAbandonedTimer
- All Implemented Interfaces:
- InvocationHandler,- ResetAbandonedTimerMBean
Class that resets the abandoned timer on any activity on the
 Connection or any successful query executions.
 This interceptor is useful for when you have a 
PoolConfiguration.setRemoveAbandonedTimeout(int)
 that is fairly low, and you want to reset the abandoned time each time any operation on the connection is performed
 This is useful for batch processing programs that use connections for extensive amount of times.- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.tomcat.jdbc.pool.interceptor.AbstractQueryReportAbstractQueryReport.StatementProxy
- 
Field SummaryFields inherited from class org.apache.tomcat.jdbc.pool.interceptor.AbstractQueryReportthresholdFields inherited from class org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptorconstructors, CREATE_STATEMENT, CREATE_STATEMENT_IDX, EXECUTE, EXECUTE_BATCH, EXECUTE_QUERY, EXECUTE_TYPES, EXECUTE_UPDATE, PREPARE_CALL, PREPARE_CALL_IDX, PREPARE_STATEMENT, PREPARE_STATEMENT_IDX, STATEMENT_TYPE_COUNT, STATEMENT_TYPESFields inherited from class org.apache.tomcat.jdbc.pool.JdbcInterceptorCLOSE_VAL, EQUALS_VAL, GETCONNECTION_VAL, HASHCODE_VAL, ISCLOSED_VAL, ISVALID_VAL, ISWRAPPERFOR_VAL, properties, TOSTRING_VAL, UNWRAP_VAL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidMethod invoked when the operationConnection.close()is invoked.Gets invoked each time an operation onConnectionis invoked.protected voidprepareCall(String query, long time) Invoked when prepareCall has been called and completed.protected voidprepareStatement(String sql, long time) Invoked when prepareStatement has been called and completed.protected StringreportQuery(String query, Object[] args, String name, long start, long delta) Invoked when a query execution, a call to execute/executeQuery or executeBatch succeeded and was within the timing thresholdprotected StringreportSlowQuery(String query, Object[] args, String name, long start, long delta) Invoked when a query execution, a call to execute/executeQuery or executeBatch succeeded and was exceeded the timing thresholdvoidreset(ConnectionPool parent, PooledConnection con) no-op for this interceptor. no state is stored.booleanMethods inherited from class org.apache.tomcat.jdbc.pool.interceptor.AbstractQueryReportcreateStatement, getThreshold, reportFailedQuery, setThresholdMethods inherited from class org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptorgetConstructor, isExecute, isStatement, processMethods inherited from class org.apache.tomcat.jdbc.pool.JdbcInterceptorcompare, compare, disconnected, getNext, getProperties, isUseEquals, poolClosed, poolStarted, setNext, setProperties, setUseEquals
- 
Constructor Details- 
ResetAbandonedTimerpublic ResetAbandonedTimer()
 
- 
- 
Method Details- 
resetDescription copied from class:AbstractCreateStatementInterceptorno-op for this interceptor. no state is stored.- Overrides:
- resetin class- AbstractCreateStatementInterceptor
- Parameters:
- parent- - the connection pool owning the connection
- con- - the pooled connection
 
- 
resetTimerpublic boolean resetTimer()- Specified by:
- resetTimerin interface- ResetAbandonedTimerMBean
 
- 
invokeDescription copied from class:JdbcInterceptorGets invoked each time an operation onConnectionis invoked.- Specified by:
- invokein interface- InvocationHandler
- Overrides:
- invokein class- AbstractCreateStatementInterceptor
- Throws:
- Throwable
 
- 
prepareCallDescription copied from class:AbstractQueryReportInvoked when prepareCall has been called and completed.- Specified by:
- prepareCallin class- AbstractQueryReport
- Parameters:
- query- - the string used to prepare the statement with
- time- - the time it took to invoke prepare
 
- 
prepareStatementDescription copied from class:AbstractQueryReportInvoked when prepareStatement has been called and completed.- Specified by:
- prepareStatementin class- AbstractQueryReport
- Parameters:
- sql- - the string used to prepare the statement with
- time- - the time it took to invoke prepare
 
- 
closeInvokedpublic void closeInvoked()Description copied from class:AbstractCreateStatementInterceptorMethod invoked when the operationConnection.close()is invoked.- Specified by:
- closeInvokedin class- AbstractCreateStatementInterceptor
 
- 
reportQueryDescription copied from class:AbstractQueryReportInvoked when a query execution, a call to execute/executeQuery or executeBatch succeeded and was within the timing threshold- Overrides:
- reportQueryin class- AbstractQueryReport
- Parameters:
- query- the query that was executed and failed
- args- the arguments to the execution
- name- the name of the method used to execute- AbstractCreateStatementInterceptor.isExecute(Method, boolean)
- start- the time the query execution started
- delta- the time the execution took
- Returns:
- - the SQL that was executed or the string "batch" if it was a batch execution
 
- 
reportSlowQueryDescription copied from class:AbstractQueryReportInvoked when a query execution, a call to execute/executeQuery or executeBatch succeeded and was exceeded the timing threshold- Overrides:
- reportSlowQueryin class- AbstractQueryReport
- Parameters:
- query- the query that was executed and failed
- args- the arguments to the execution
- name- the name of the method used to execute- AbstractCreateStatementInterceptor.isExecute(Method, boolean)
- start- the time the query execution started
- delta- the time the execution took
- Returns:
- - the SQL that was executed or the string "batch" if it was a batch execution
 
 
-