public interface StatementCache
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this StatementCache and removes all entries from it.
|
boolean |
isClosed()
Returns
true if this StatementCache is closed; false otherwise. |
boolean |
remove(StatementHolder statement)
Removes an entry from the cache (if such) for the given
statement. |
int |
removeAll(Connection rawConnection)
Removes all entries from the cache (if any) for the given
rawConnection. |
boolean |
restore(StatementHolder statement,
boolean clearWarnings)
Restores (i.e.
|
StatementHolder |
take(StatementMethod statementMethod)
Returns a possibly cached StatementHolder object for the given connection statement method.
|
StatementHolder take(StatementMethod statementMethod) throws SQLException
statementMethod - the statement methodSQLException - if the invoked underlying "prepare..." method throws an exceptionboolean restore(StatementHolder statement, boolean clearWarnings)
StatementHolder back in the cache.statement - the given StatementHolderclearWarnings - if true will execute Statement.clearWarnings() on the underlying
raw PreparedStatementstatement in the cache, false otherwiseboolean remove(StatementHolder statement)
statement. Does not close
the removed statement.statement - the StatementHolder to be removedint removeAll(Connection rawConnection)
rawConnection. Closes
all removed statements.rawConnection - the connection for which the entries to be removedvoid close()
boolean isClosed()
true if this StatementCache is closed; false otherwise.Copyright © 2013-2019 vibur.org. All Rights Reserved.