java.lang.Object
edu.iu.jdbc.pool.IuStatementHandler
- All Implemented Interfaces:
InvocationHandler
Intercepts, controls caching for, and logs activty on,
Statement
,
PreparedStatement
, and CallableStatement
instances.-
Constructor Summary
ConstructorsConstructorDescriptionIuStatementHandler
(String sql, PreparedStatement statement, UnsafeBiConsumer<UnsafeRunnable, Throwable> closeHandler) Constructor.IuStatementHandler
(Statement statement) Constructor. -
Method Summary
-
Constructor Details
-
IuStatementHandler
Constructor.- Parameters:
statement
-Statement
instance to delegate to.
-
IuStatementHandler
public IuStatementHandler(String sql, PreparedStatement statement, UnsafeBiConsumer<UnsafeRunnable, Throwable> closeHandler) Constructor.- Parameters:
sql
-PreparedStatement
SQL templatestatement
-PreparedStatement
instance to delegate to.closeHandler
-UnsafeBiConsumer
to accept a thunk for delegatingStatement.close()
to close the actual statement and potentially a reference to the error that caused the statement to close.
-
-
Method Details
-
invoke
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-