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-Statementinstance to delegate to.
-
IuStatementHandler
public IuStatementHandler(String sql, PreparedStatement statement, UnsafeBiConsumer<UnsafeRunnable, Throwable> closeHandler) Constructor.- Parameters:
sql-PreparedStatementSQL templatestatement-PreparedStatementinstance to delegate to.closeHandler-UnsafeBiConsumerto 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:
invokein interfaceInvocationHandler- Throws:
Throwable
-