Package org.infinispan.container.impl
Interface PeekableTouchableMap<K,V>
- All Superinterfaces:
ConcurrentMap<K,
,InternalCacheEntry<K, V>> Map<K,
InternalCacheEntry<K, V>>
- All Known Implementing Classes:
OffHeapConcurrentMap
,PeekableTouchableCaffeineMap
,PeekableTouchableContainerMap
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionPeaks at a value for the given key.default void
putNoReturn
(K key, InternalCacheEntry<K, V> value) Same asMap.put(Object, Object)
except that the map is not required to return a value.void
touchAll
(long currentTimeMillis) Touches all entries in the map setting the recency timestamps for both expiration eviction appropriately.boolean
Touches the entry for the given key in this map.Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
peek
Peaks 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.- Parameters:
key
- The key to find the value for- Returns:
- The value mapping to this key
-
touchKey
Touches the entry for the given key in this map. This method will update any recency timestamps for both expiration or eviction as needed.- Parameters:
key
- key to touchcurrentTimeMillis
- the recency timestamp to set- Returns:
- whether the entry was touched or not
-
touchAll
void touchAll(long currentTimeMillis) Touches all entries in the map setting the recency timestamps for both expiration eviction appropriately.- Parameters:
currentTimeMillis
- the recency timestamp to set
-
putNoReturn
Same asMap.put(Object, Object)
except that the map is not required to return a value. This can be useful when retrieving a previous value may incur additional costs.- Parameters:
key
- key to insert for the valuevalue
- the value to insert into this map
-