Package org.apache.shenyu.common.cache
Class MemorySafeLRUMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.apache.commons.collections4.map.AbstractHashedMap<K,V>
-
- org.apache.commons.collections4.map.AbstractLinkedMap<K,V>
-
- org.apache.commons.collections4.map.LRUMap<K,V>
-
- org.apache.shenyu.common.cache.MemorySafeLRUMap<K,V>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<K,V>,org.apache.commons.collections4.BoundedMap<K,V>,org.apache.commons.collections4.Get<K,V>,org.apache.commons.collections4.IterableGet<K,V>,org.apache.commons.collections4.IterableMap<K,V>,org.apache.commons.collections4.OrderedMap<K,V>,org.apache.commons.collections4.Put<K,V>
@NotThreadSafe public class MemorySafeLRUMap<K,V> extends org.apache.commons.collections4.map.LRUMap<K,V>The only difference between this class andLRUMapis that it handles memory issues viaMemoryLimitCalculator.Note: this class is not thread safe! see https://github.com/apache/shenyu/issues/3929
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.collections4.map.AbstractLinkedMap
org.apache.commons.collections4.map.AbstractLinkedMap.EntrySetIterator<K extends java.lang.Object,V extends java.lang.Object>, org.apache.commons.collections4.map.AbstractLinkedMap.KeySetIterator<K extends java.lang.Object>, org.apache.commons.collections4.map.AbstractLinkedMap.LinkEntry<K extends java.lang.Object,V extends java.lang.Object>, org.apache.commons.collections4.map.AbstractLinkedMap.LinkIterator<K extends java.lang.Object,V extends java.lang.Object>, org.apache.commons.collections4.map.AbstractLinkedMap.LinkMapIterator<K extends java.lang.Object,V extends java.lang.Object>, org.apache.commons.collections4.map.AbstractLinkedMap.ValuesIterator<V extends java.lang.Object>
-
Nested classes/interfaces inherited from class org.apache.commons.collections4.map.AbstractHashedMap
org.apache.commons.collections4.map.AbstractHashedMap.EntrySet<K extends java.lang.Object,V extends java.lang.Object>, org.apache.commons.collections4.map.AbstractHashedMap.HashEntry<K extends java.lang.Object,V extends java.lang.Object>, org.apache.commons.collections4.map.AbstractHashedMap.HashIterator<K extends java.lang.Object,V extends java.lang.Object>, org.apache.commons.collections4.map.AbstractHashedMap.HashMapIterator<K extends java.lang.Object,V extends java.lang.Object>, org.apache.commons.collections4.map.AbstractHashedMap.KeySet<K extends java.lang.Object>, org.apache.commons.collections4.map.AbstractHashedMap.Values<V extends java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description MemorySafeLRUMap(int maxFreeMemory, int initialSize)MemorySafeLRUMap(int maxFreeMemory, int initialSize, float loadFactor)MemorySafeLRUMap(int maxFreeMemory, int initialSize, float loadFactor, boolean scanUntilRemovable)MemorySafeLRUMap(int maxFreeMemory, java.util.Map<? extends K,? extends V> map)MemorySafeLRUMap(int maxFreeMemory, java.util.Map<? extends K,? extends V> map, boolean scanUntilRemovable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisFull()-
Methods inherited from class org.apache.commons.collections4.map.LRUMap
addMapping, clone, doReadObject, doWriteObject, get, get, isScanUntilRemovable, maxSize, moveToMRU, removeLRU, reuseMapping, updateEntry
-
Methods inherited from class org.apache.commons.collections4.map.AbstractLinkedMap
addEntry, clear, containsValue, createEntry, createEntrySetIterator, createKeySetIterator, createValuesIterator, entryAfter, entryBefore, firstKey, getEntry, getEntry, init, lastKey, mapIterator, nextKey, previousKey, removeEntry
-
Methods inherited from class org.apache.commons.collections4.map.AbstractHashedMap
calculateNewCapacity, calculateThreshold, checkCapacity, containsKey, convertKey, destroyEntry, ensureCapacity, entryHashCode, entryKey, entryNext, entrySet, entryValue, equals, hash, hashCode, hashIndex, isEmpty, isEqualKey, isEqualValue, keySet, put, putAll, remove, removeMapping, reuseEntry, size, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.commons.collections4.Get
containsKey, containsValue, entrySet, isEmpty, keySet, remove, size, values
-
-
-
-
Constructor Detail
-
MemorySafeLRUMap
public MemorySafeLRUMap(int maxFreeMemory, int initialSize)
-
MemorySafeLRUMap
public MemorySafeLRUMap(int maxFreeMemory, int initialSize, float loadFactor)
-
MemorySafeLRUMap
public MemorySafeLRUMap(int maxFreeMemory, int initialSize, float loadFactor, boolean scanUntilRemovable)
-
MemorySafeLRUMap
public MemorySafeLRUMap(int maxFreeMemory, java.util.Map<? extends K,? extends V> map)
-
-