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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected CachedValue<K, V> protected voidprotected voidonValueCreate(CachedValue<K, V> value) protected voidonValueRead(CachedValue<K, V> value) protected voidonValueRemove(CachedValue<K, V> 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, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
createin classAbstractCacheMap<K,V>
-
onValueCreate
- Overrides:
onValueCreatein classAbstractCacheMap<K,V>
-
onValueRead
- Overrides:
onValueReadin classAbstractCacheMap<K,V>
-
onValueRemove
- Overrides:
onValueRemovein classAbstractCacheMap<K,V>
-
onMapFull
protected void onMapFull()- Specified by:
onMapFullin classAbstractCacheMap<K,V>
-
clear
public void clear()
-