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) |
LoggingLRUMap(LoggingLRUMap<KEYTYPE,VALUETYPE> rhs) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
LoggingLRUMap<KEYTYPE,VALUETYPE> |
getClone() |
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, removeEldestEntrycreateInstanceclear, 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, copyOfKeySet, getLastKey, getLastKey, getLastValue, getLastValueaddAll, containsAnyEntry, containsAnyKey, containsAnyValue, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, findFirstEntry, findFirstKey, findFirstValue, forEach, forEachKey, forEachKey, forEachValue, forEachValue, getAsUnmodifiable, getFirstEntry, getFirstEntry, getFirstKey, getFirstKey, getFirstValue, getFirstValue, getSortedByKey, getSortedByValue, getSwappedKeyValues, isNotEmpty, putAll, putAll, putAllMapped, putAllMapped, putAllMapped, putIf, putIfNotNull, removeAll, removeObject, 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)
public LoggingLRUMap(@Nonnull LoggingLRUMap<KEYTYPE,VALUETYPE> rhs)
@Nonnull public LoggingLRUMap<KEYTYPE,VALUETYPE> getClone()
getClone in interface ICommonsOrderedMap<KEYTYPE,VALUETYPE>getClone in interface ICloneable<ICommonsMap<KEYTYPE,VALUETYPE>>getClone in class LRUMap<KEYTYPE,VALUETYPE>@Nonnull public final LoggingLRUMap<KEYTYPE,VALUETYPE> setMapName(@Nullable String sMapName)
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–2017 Philip Helger. All rights reserved.