Package org.redisson.cache
Class LFUCacheMap<K,V>
java.lang.Object
org.redisson.cache.AbstractCacheMap<K,V>
org.redisson.cache.LFUCacheMap<K,V>
- Type Parameters:
K
- keyV
- value
- All Implemented Interfaces:
ConcurrentMap<K,
,V> Map<K,
,V> Cache<K,
V>
LFU (least frequently used) cache.
- Author:
- Nikita Koksharov
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
protected CachedValue
protected void
protected void
onValueCreate
(CachedValue value) protected void
onValueRead
(CachedValue value) protected void
onValueRemove
(CachedValue value) Methods inherited from class org.redisson.cache.AbstractCacheMap
containsKey, containsValue, 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
-
LFUCacheMap
public LFUCacheMap(int size, long timeToLiveInMillis, long maxIdleInMillis)
-
-
Method Details
-
create
- Overrides:
create
in classAbstractCacheMap<K,
V>
-
onValueCreate
- Overrides:
onValueCreate
in classAbstractCacheMap<K,
V>
-
onValueRead
- Overrides:
onValueRead
in classAbstractCacheMap<K,
V>
-
onValueRemove
- Overrides:
onValueRemove
in classAbstractCacheMap<K,
V>
-
onMapFull
protected void onMapFull()- Specified by:
onMapFull
in classAbstractCacheMap<K,
V>
-
clear
public void clear()
-