public class CallableStatementCache extends java.util.LinkedHashMap<CallableStatementCacheKey,java.sql.CallableStatement>
Modifier and Type | Field and Description |
---|---|
private int |
maxSize |
Modifier | Constructor and Description |
---|---|
private |
CallableStatementCache(int size) |
Modifier and Type | Method and Description |
---|---|
static CallableStatementCache |
newInstance(int size) |
java.sql.CallableStatement |
putIfNone(CallableStatementCacheKey key,
java.sql.CallableStatement value)
Add prepared statement to cache.
|
protected boolean |
removeEldestEntry(java.util.Map.Entry<CallableStatementCacheKey,java.sql.CallableStatement> eldest) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
public static CallableStatementCache newInstance(int size)
public java.sql.CallableStatement putIfNone(CallableStatementCacheKey key, java.sql.CallableStatement value)
key
- sqlvalue
- prepareResultprotected boolean removeEldestEntry(java.util.Map.Entry<CallableStatementCacheKey,java.sql.CallableStatement> eldest)
removeEldestEntry
in class java.util.LinkedHashMap<CallableStatementCacheKey,java.sql.CallableStatement>