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>
public class LRUCacheMap<K,V> extends AbstractCacheMap<K,V>
LRU (least recently used) cache.- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description LRUCacheMap(int size, long timeToLiveInMillis, long maxIdleInMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
protected void
onMapFull()
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
-
-
-
-
Method Detail
-
onValueCreate
protected void onValueCreate(CachedValue<K,V> value)
- Overrides:
onValueCreate
in classAbstractCacheMap<K,V>
-
onValueRemove
protected void onValueRemove(CachedValue<K,V> value)
- Overrides:
onValueRemove
in classAbstractCacheMap<K,V>
-
onValueRead
protected void onValueRead(CachedValue<K,V> value)
- Overrides:
onValueRead
in classAbstractCacheMap<K,V>
-
onMapFull
protected void onMapFull()
- Specified by:
onMapFull
in classAbstractCacheMap<K,V>
-
-