Package org.redisson.cache
Class AbstractCacheMap<K,V>
java.lang.Object
org.redisson.cache.AbstractCacheMap<K,V>
- Type Parameters:
K- keyV- value
- All Implemented Interfaces:
ConcurrentMap<K,,V> Map<K,,V> Cache<K,V>
- Direct Known Subclasses:
LFUCacheMap,LRUCacheMap,NoneCacheMap,ReferenceCacheMap
- Author:
- Nikita Koksharov
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) protected CachedValue<K, V> entrySet()booleanisEmpty()protected booleankeySet()protected abstract voidprotected voidonValueCreate(CachedValue<K, V> entry) protected voidonValueRead(CachedValue<K, V> value) protected voidonValueRemove(CachedValue<K, V> value) voidputIfAbsent(K key, V value) protected VreadValue(CachedValue<K, V> entry) booleanprotected booleanbooleanintsize()values()Methods 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
-
AbstractCacheMap
public AbstractCacheMap(int size, long timeToLiveInMillis, long maxIdleInMillis)
-
-
Method Details
-
onValueRead
-
onValueRemove
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
readValue
-
put
-
create
-
onValueCreate
-
removeExpiredEntries
protected boolean removeExpiredEntries() -
onMapFull
protected abstract void onMapFull() -
isFull
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
-
replace
-
replace
-