private static class KerberosUtil.SoftCache.LRUHashMap extends LinkedHashMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
private int |
maxCacheSize |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
LRUHashMap(int maxCacheSize,
int initialCapacity)
Construct an instance of the hash map.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
removeEldestEntry(Map.Entry eldest) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeprivate static final long serialVersionUID
private int maxCacheSize
LRUHashMap(int maxCacheSize,
int initialCapacity)
maxCacheSize - maximum number of entries allowed
in this mapinitialCapacity - initial capacity of the mapIllegalArgumentException - if maxCacheSize is
negativeprotected boolean removeEldestEntry(Map.Entry eldest)
removeEldestEntry in class LinkedHashMapCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.