## 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
`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, get`

Methods inherited from class java.util.HashMap
`clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values`

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
`containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values`

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:
    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.