Top Fields Constructors Methods
org.apache.tomcat.jdbc.pool.interceptor

public Class QueryTimeoutInterceptor

extends AbstractCreateStatementInterceptor
Class Inheritance
Imports
java.lang.reflect.Method, java.sql.SQLException, .Statement, java.util.Map, org.apache.juli.logging.Log, .LogFactory, org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty

Field Summary

Modifier and TypeField and Description
private static Log
pack-priv int
Inherited from org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor:
constructorsCREATE_STATEMENTCREATE_STATEMENT_IDXEXECUTEEXECUTE_BATCHEXECUTE_QUERYEXECUTE_TYPESEXECUTE_UPDATEPREPARE_CALLPREPARE_CALL_IDXPREPARE_STATEMENTPREPARE_STATEMENT_IDXSTATEMENT_TYPE_COUNTSTATEMENT_TYPES

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public Object
createStatement(Object
the actual proxy object
proxy
,
Method
the method that was called. It will be one of the methods defined in STATEMENT_TYPES
method
,
Object[]
the arguments to the method
args
,
Object
the statement that the underlying connection created
statement
,
long
Elapsed time
time
)

Implements abstract org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.createStatement.

This method will be invoked after a successful statement creation.

public void
setProperties(Map<String, PoolProperties.InterceptorProperty>
The properties
properties
)

Overrides org.apache.tomcat.jdbc.pool.JdbcInterceptor.setProperties.

Called during the creation of an interceptor The properties can be set during the configuration of an interceptor Override this method to perform type casts between string values and object properties

Inherited from org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor:
getConstructorinvokeisExecuteisStatementprocessreset

Field Detail

logback to summary
private static Log log
timeoutback to summary
pack-priv int timeout

Constructor Detail

QueryTimeoutInterceptorback to summary
public QueryTimeoutInterceptor()

Method Detail

closeInvokedback to summary
public void closeInvoked()

Implements abstract org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.closeInvoked.

Doc from org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.closeInvoked.

Method invoked when the operation java.sql.Connection#close() is invoked.

Annotations
@Override
createStatementback to summary
public Object createStatement(Object proxy, Method method, Object[] args, Object statement, long time)

Implements abstract org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.createStatement.

Doc from org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.createStatement.

This method will be invoked after a successful statement creation. This method can choose to return a wrapper around the statement or return the statement itself. If this method returns a wrapper then it should return a wrapper object that implements one of the following interfaces. java.sql.Statement, java.sql.PreparedStatement or java.sql.CallableStatement

Parameters
proxy:Object

the actual proxy object

method:Method

the method that was called. It will be one of the methods defined in STATEMENT_TYPES

args:Object[]

the arguments to the method

statement:Object

the statement that the underlying connection created

time:long

Elapsed time

Returns:Object

a java.sql.Statement object

Annotations
@Override
setPropertiesback to summary
public void setProperties(Map<String, PoolProperties.InterceptorProperty> properties)

Overrides org.apache.tomcat.jdbc.pool.JdbcInterceptor.setProperties.

Doc from org.apache.tomcat.jdbc.pool.JdbcInterceptor.setProperties.

Called during the creation of an interceptor The properties can be set during the configuration of an interceptor Override this method to perform type casts between string values and object properties

Parameters
properties:Map<String, PoolProperties.InterceptorProperty>

The properties

Annotations
@Override