public final class PrepareStatementCache extends LinkedHashMap<String,PrepareResult>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Method and Description |
---|---|
static PrepareStatementCache |
newInstance(int size,
Protocol protocol) |
PrepareResult |
put(String key,
PrepareResult result,
boolean force)
Associates the specified value with the specified key in this map.
|
boolean |
removeEldestEntry(Map.Entry eldest)
Remove eldestEntry.
|
String |
toString() |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
public static PrepareStatementCache newInstance(int size, Protocol protocol)
public boolean removeEldestEntry(Map.Entry eldest)
removeEldestEntry
in class LinkedHashMap<String,PrepareResult>
eldest
- eldest entrypublic PrepareResult put(String key, PrepareResult result, boolean force)
key
- keyresult
- new prepare result.force
- flag to indicate if cache must be forced (after a failover)public String toString()
toString
in class AbstractMap<String,PrepareResult>
Copyright © 2016. All rights reserved.