Class StatementFinalizer.CloseAwareProxy
- java.lang.Object
-
- org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer.CloseAwareProxy
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
- Enclosing class:
- StatementFinalizer
protected class StatementFinalizer.CloseAwareProxy extends java.lang.Object implements java.lang.reflect.InvocationHandlerThin proxy around a tracked statement. Every call is delegated unchanged; onlyclose()is reacted to, by forgetting the tracked entry so that a statement the application closed properly neither lingers in the list nor is touched again when the connection is returned.Object.equals(Object)andhashCode()are answered on the handle itself, asProxyConnectionand the pool's other statement proxies answer them: the handle equals only itself and hashes at its own identity, so a container holding it next to an unwrapped handle for the same statement holds two elements whichever of the two arrived first. Reaching the statement underneath isunwrap's purpose, and there the driver's own equality applies.
-
-
Constructor Summary
Constructors Constructor Description CloseAwareProxy(StatementFinalizer.StatementEntry entry)Creates a handler for the given tracked statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
-
-
-
Constructor Detail
-
CloseAwareProxy
public CloseAwareProxy(StatementFinalizer.StatementEntry entry)
Creates a handler for the given tracked statement.- Parameters:
entry- the list entry tracking the statement
-
-