Class StatementCache.CachedStatement
java.lang.Object
org.apache.tomcat.jdbc.pool.interceptor.StatementDecoratorInterceptor.StatementProxy<PreparedStatement>
org.apache.tomcat.jdbc.pool.interceptor.StatementCache.CachedStatement
- All Implemented Interfaces:
InvocationHandler
- Enclosing class:
StatementCache
protected class StatementCache.CachedStatement
extends StatementDecoratorInterceptor.StatementProxy<PreparedStatement>
Proxy for a cached prepared statement.
-
Field Summary
Fields inherited from class StatementDecoratorInterceptor.StatementProxy
closed, delegate -
Constructor Summary
ConstructorsConstructorDescriptionCachedStatement(PreparedStatement parent, String sql) Constructs a CachedStatement. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the close method is invoked on the statement.voidForces immediate closure of this cached statement.org.apache.tomcat.jdbc.pool.interceptor.StatementCache.CacheKeyReturns the cache key for this statement.voidsetCacheKey(org.apache.tomcat.jdbc.pool.interceptor.StatementCache.CacheKey cacheKey) Sets the cache key for this statement.Methods inherited from class StatementDecoratorInterceptor.StatementProxy
getActualProxy, getConnection, getConstructor, getDelegate, getSql, invoke, setActualProxy, setConnection, setConstructor, toString
-
Constructor Details
-
CachedStatement
Constructs a CachedStatement.- Parameters:
parent- the parent prepared statementsql- the SQL text
-
-
Method Details
-
closeInvoked
public void closeInvoked()Description copied from class:StatementDecoratorInterceptor.StatementProxyCalled when the close method is invoked on the statement.- Overrides:
closeInvokedin classStatementDecoratorInterceptor.StatementProxy<PreparedStatement>
-
forceClose
public void forceClose()Forces immediate closure of this cached statement. -
getCacheKey
public org.apache.tomcat.jdbc.pool.interceptor.StatementCache.CacheKey getCacheKey()Returns the cache key for this statement.- Returns:
- the cache key
-
setCacheKey
public void setCacheKey(org.apache.tomcat.jdbc.pool.interceptor.StatementCache.CacheKey cacheKey) Sets the cache key for this statement.- Parameters:
cacheKey- the cache key
-