Package org.redisson.cache
Class ReferenceCacheMap<K,V>
- java.lang.Object
-
- org.redisson.cache.AbstractCacheMap<K,V>
-
- org.redisson.cache.ReferenceCacheMap<K,V>
-
- Type Parameters:
K
- keyV
- value
- All Implemented Interfaces:
ConcurrentMap<K,V>
,Map<K,V>
,Cache<K,V>
public class ReferenceCacheMap<K,V> extends AbstractCacheMap<K,V>
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CachedValue<K,V>
create(K key, V value, long ttl, long maxIdleTime)
protected boolean
isFull(K key)
protected void
onMapFull()
protected boolean
removeExpiredEntries()
static <K,V>
ReferenceCacheMap<K,V>soft(long timeToLiveInMillis, long maxIdleInMillis)
static <K,V>
ReferenceCacheMap<K,V>weak(long timeToLiveInMillis, long maxIdleInMillis)
-
Methods inherited from class org.redisson.cache.AbstractCacheMap
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, onValueCreate, onValueRead, onValueRemove, put, putAll, putIfAbsent, readValue, remove, remove, 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
-
weak
public static <K,V> ReferenceCacheMap<K,V> weak(long timeToLiveInMillis, long maxIdleInMillis)
-
soft
public static <K,V> ReferenceCacheMap<K,V> soft(long timeToLiveInMillis, long maxIdleInMillis)
-
create
protected CachedValue<K,V> create(K key, V value, long ttl, long maxIdleTime)
- Overrides:
create
in classAbstractCacheMap<K,V>
-
isFull
protected boolean isFull(K key)
- Overrides:
isFull
in classAbstractCacheMap<K,V>
-
removeExpiredEntries
protected boolean removeExpiredEntries()
- Overrides:
removeExpiredEntries
in classAbstractCacheMap<K,V>
-
onMapFull
protected void onMapFull()
- Specified by:
onMapFull
in classAbstractCacheMap<K,V>
-
-