Class BoundedLinkedHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
software.amazon.awssdk.utils.internal.BoundedLinkedHashMap<K,V>
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,V>
A bounded linked hash map that would remove the eldest entry when the map size exceeds a configurable maximum.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum size of this map beyond which the eldest entry will get removed.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
BoundedLinkedHashMap
public BoundedLinkedHashMap(int maxSize)
-
-
Method Details
-
getMaxSize
public int getMaxSize()Returns the maximum size of this map beyond which the eldest entry will get removed.
-