org.mariadb.jdbc.internal.util
Class CallableStatementCache
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<CallableStatementCacheKey,CallableStatement>
org.mariadb.jdbc.internal.util.CallableStatementCache
- All Implemented Interfaces:
- Serializable, Cloneable, Map<CallableStatementCacheKey,CallableStatement>
public class CallableStatementCache
- extends LinkedHashMap<CallableStatementCacheKey,CallableStatement>
- See Also:
- Serialized Form
Methods inherited from interface java.util.Map |
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
newInstance
public static CallableStatementCache newInstance(int size)
putIfNone
public CallableStatement putIfNone(CallableStatementCacheKey key,
CallableStatement value)
- Add prepared statement to cache.
- Parameters:
key
- sqlvalue
- prepareResult
- Returns:
- ServerPrepareResult to avoid to prepare statement.
removeEldestEntry
protected boolean removeEldestEntry(Map.Entry<CallableStatementCacheKey,CallableStatement> eldest)
- Overrides:
removeEldestEntry
in class LinkedHashMap<CallableStatementCacheKey,CallableStatement>
Copyright © 2017. All rights reserved.