KEYTYPE - Map key typeVALUETYPE - Map value type@NotThreadSafe @UseDirectEqualsAndHashCode public class LoggingLRUMap<KEYTYPE,VALUETYPE> extends LRUMap<KEYTYPE,VALUETYPE>
LRUMap that emits a warning once the map is full and the
oldest entry gets discarded.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
LoggingLRUMap(int nMaxSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getMapName() |
int |
hashCode() |
protected void |
onRemoveEldestEntry(int nSize,
Map.Entry<KEYTYPE,VALUETYPE> aEntry)
Protected method that is invoked every time the oldest entry is removed.
|
LoggingLRUMap<KEYTYPE,VALUETYPE> |
setMapName(String sMapName) |
String |
toString() |
getMaxSize, removeEldestEntrygetCloneclear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizefinalize, getClass, notify, notifyAll, wait, wait, waitcopyOfEntrySet, copyOfKeySet, getLastKey, getLastValueaddAll, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, findFirstEntry, findFirstKey, findFirstValue, getAsUnmodifiable, getFirstEntry, getFirstKey, getFirstValue, getSortedByKey, getSortedByValue, getSwappedKeyValues, isNotEmpty, putIf, putIfNotNull, removeAll, setAllclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic LoggingLRUMap(@Nonnegative int nMaxSize)
protected void onRemoveEldestEntry(@Nonnegative int nSize, @Nonnull Map.Entry<KEYTYPE,VALUETYPE> aEntry)
LRUMaponRemoveEldestEntry in class LRUMap<KEYTYPE,VALUETYPE>nSize - Current size of the map. Always ≥ 0.aEntry - The map entry that is removed. Never null.public boolean equals(Object o)
public int hashCode()
Copyright © 2014–2016 Philip Helger. All rights reserved.