Package org.redisson.cache
Class LRUCacheMap<K,V>
java.lang.Object
org.redisson.cache.AbstractCacheMap<K,V>
org.redisson.cache.LRUCacheMap<K,V>
- Type Parameters:
K
- keyV
- value
- All Implemented Interfaces:
ConcurrentMap<K,
,V> Map<K,
,V> Cache<K,
V>
LRU (least recently used) cache.
- Author:
- Nikita Koksharov
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
protected void
protected void
onValueCreate
(CachedValue<K, V> value) protected void
onValueRead
(CachedValue<K, V> value) protected void
onValueRemove
(CachedValue<K, V> value) Methods inherited from class org.redisson.cache.AbstractCacheMap
containsKey, containsValue, create, entrySet, get, isEmpty, isFull, keySet, put, putAll, putIfAbsent, readValue, remove, remove, removeExpiredEntries, replace, replace, size, values
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
LRUCacheMap
public LRUCacheMap(int size, long timeToLiveInMillis, long maxIdleInMillis)
-
-
Method Details
-
onValueCreate
- Overrides:
onValueCreate
in classAbstractCacheMap<K,
V>
-
onValueRemove
- Overrides:
onValueRemove
in classAbstractCacheMap<K,
V>
-
onValueRead
- Overrides:
onValueRead
in classAbstractCacheMap<K,
V>
-
onMapFull
protected void onMapFull()- Specified by:
onMapFull
in classAbstractCacheMap<K,
V>
-
clear
public void clear()
-