public class PreparedStatementCache extends Object
| Constructor and Description |
|---|
PreparedStatementCache(int cacheCapacity) |
| Modifier and Type | Method and Description |
|---|---|
PreparedStatement |
evict() |
PreparedStatement |
get(String sql) |
boolean |
isFull() |
List<PreparedStatement> |
put(PreparedStatement preparedStatement)
Put a statement in the cache.
|
void |
remove(String sql)
Remove the cached entry when the cached statement is closing so that pending requests will not use a closed prepared statement.
|
int |
size() |
public PreparedStatement get(String sql)
public List<PreparedStatement> put(PreparedStatement preparedStatement)
preparedStatement - the prepared statement to cachepublic void remove(String sql)
sql - the identified sql of the cached statementpublic PreparedStatement evict()
public boolean isFull()
public int size()
Copyright © 2021. All rights reserved.