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

### Nested Class Summary

### Nested classes/interfaces inherited from class java.util.AbstractMap

`AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static CallableStatementCache` `newInstance(int size)`
`CallableStatement` `putIfNone(CallableStatementCacheKey key, CallableStatement value)` Add prepared statement to cache.
`protected boolean` `removeEldestEntry(Map.Entry<CallableStatementCacheKey,CallableStatement> eldest)`

### Methods inherited from class java.util.LinkedHashMap

`clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values`

### Methods inherited from class java.util.HashMap

`clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size`

### Methods inherited from class java.util.AbstractMap

`equals, hashCode, toString`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Map

`compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size`

### Method Detail

#### newInstance

    public static CallableStatementCache newInstance(int size)

#### putIfNone

    public CallableStatement putIfNone(CallableStatementCacheKey key,
                                       CallableStatement value)

Add prepared statement to cache.

Parameters:
  `key` - sql
  `value` - prepareResult
Returns:
  PrepareResult to avoid to prepare statement.

#### removeEldestEntry

    protected boolean removeEldestEntry(Map.Entry<CallableStatementCacheKey,CallableStatement> eldest)

Overrides:
  `removeEldestEntry` in class `LinkedHashMap<CallableStatementCacheKey,CallableStatement>`