Package org.infinispan.container.impl
Class PeekableTouchableCaffeineMap<K,V>
- java.lang.Object
-
- org.infinispan.commons.util.AbstractDelegatingMap<K,V>
-
- org.infinispan.commons.util.AbstractDelegatingConcurrentMap<K,InternalCacheEntry<K,V>>
-
- org.infinispan.container.impl.PeekableTouchableCaffeineMap<K,V>
-
- All Implemented Interfaces:
ConcurrentMap<K,InternalCacheEntry<K,V>>,Map<K,InternalCacheEntry<K,V>>,PeekableTouchableMap<K,V>
public class PeekableTouchableCaffeineMap<K,V> extends org.infinispan.commons.util.AbstractDelegatingConcurrentMap<K,InternalCacheEntry<K,V>> implements PeekableTouchableMap<K,V>
-
-
Constructor Summary
Constructors Constructor Description PeekableTouchableCaffeineMap(com.github.benmanes.caffeine.cache.Cache<K,InternalCacheEntry<K,V>> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConcurrentMap<K,InternalCacheEntry<K,V>>delegate()InternalCacheEntry<K,V>peek(Object key)Peaks at a value for the given key.booleantouchKey(Object key, long currentTimeMillis)Touches the entry for the given key in this map.-
Methods inherited from class org.infinispan.commons.util.AbstractDelegatingMap
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, 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, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
PeekableTouchableCaffeineMap
public PeekableTouchableCaffeineMap(com.github.benmanes.caffeine.cache.Cache<K,InternalCacheEntry<K,V>> cache)
-
-
Method Detail
-
delegate
protected ConcurrentMap<K,InternalCacheEntry<K,V>> delegate()
- Specified by:
delegatein classorg.infinispan.commons.util.AbstractDelegatingConcurrentMap<K,InternalCacheEntry<K,V>>
-
peek
public InternalCacheEntry<K,V> peek(Object key)
Description copied from interface:PeekableTouchableMapPeaks at a value for the given key. Note that this does not update any expiration or eviction information when this is performed on the map, unlike the get method.- Specified by:
peekin interfacePeekableTouchableMap<K,V>- Parameters:
key- The key to find the value for- Returns:
- The value mapping to this key
-
touchKey
public boolean touchKey(Object key, long currentTimeMillis)
Description copied from interface:PeekableTouchableMapTouches the entry for the given key in this map. This method will update any recency timestamps for both expiration or eviction as needed.- Specified by:
touchKeyin interfacePeekableTouchableMap<K,V>- Parameters:
key- key to touchcurrentTimeMillis- the recency timestamp to set- Returns:
- whether the entry was touched or not
-
-