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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) protected CachedValue<K,
V> entrySet()
boolean
isEmpty()
protected boolean
keySet()
protected abstract void
protected void
onValueCreate
(CachedValue<K, V> entry) protected void
onValueRead
(CachedValue<K, V> value) protected void
onValueRemove
(CachedValue<K, V> value) void
putIfAbsent
(K key, V value) protected V
readValue
(CachedValue<K, V> entry) boolean
protected boolean
boolean
int
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
-
AbstractCacheMap
public AbstractCacheMap(int size, long timeToLiveInMillis, long maxIdleInMillis)
-
-
Method Details
-
onValueRead
-
onValueRemove
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in 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:
putIfAbsent
in interfaceConcurrentMap<K,
V> - Specified by:
putIfAbsent
in interfaceMap<K,
V>
-
remove
-
replace
-
replace
-