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, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
private 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 LinkedHashMap
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.