Package org.cache2k.core.operation
Class Operations<K,V>
- java.lang.Object
-
- org.cache2k.core.operation.Operations<K,V>
-
public class Operations<K,V> extends Object
Semantics of all cache operations on entries.- Author:
- Jens Wilke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOperations.ExpireEvent<K,V>static classOperations.NeedsLoadRestartExceptionstatic classOperations.NeedsLockRestartExceptionstatic classOperations.WantsDataRestartException
-
Constructor Summary
Constructors Constructor Description Operations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Semantic<K,V,V>computeIfAbsent(K key, Function<? super K,? extends V> function)Semantic<K,V,Boolean>contains(K key)Semantic<K,V,Boolean>containsAndRemove(K key)Semantic<K,V,Void>expire(K key, long time)Semantic<K,V,V>get(K key)Semantic<K,V,ResultEntry<K,V>>getEntry(K key)<R> Semantic<K,V,R>invoke(org.cache2k.processor.EntryProcessor<K,V,R> processor)Semantic<K,V,V>peek(K key)Semantic<K,V,V>peekAndPut(K key, V value)Semantic<K,V,V>peekAndRemove(K key)Semantic<K,V,V>peekAndReplace(K key, V value)Semantic<K,V,ResultEntry<K,V>>peekEntry()Semantic<K,V,V>put(K key, V value)Semantic<K,V,Boolean>putIfAbsent(K key, V value)Updates intentionally hit and miss counter to adjust with JSR107.Semantic<K,V,V>remove(K key)Semantic<K,V,Boolean>remove(K key, V value)Semantic<K,V,Boolean>replace(K key, V value)Updates intentionally hit and miss counter to adjust with JSR107.Semantic<K,V,Boolean>replace(K key, V value, V newValue)
-
-
-
Field Detail
-
SINGLETON
public static final Operations SINGLETON
-
GET
public static final Semantic GET
-
unconditionalLoad
public final Semantic unconditionalLoad
-
GET_ENTRY
public static final Semantic GET_ENTRY
-
-
Method Detail
-
computeIfAbsent
public Semantic<K,V,V> computeIfAbsent(K key, Function<? super K,? extends V> function)
-
putIfAbsent
public Semantic<K,V,Boolean> putIfAbsent(K key, V value)
Updates intentionally hit and miss counter to adjust with JSR107.- See Also:
Cache.putIfAbsent(Object, Object)
-
replace
public Semantic<K,V,Boolean> replace(K key, V value)
Updates intentionally hit and miss counter to adjust with JSR107.- See Also:
Cache.replace(Object, Object)
-
invoke
public <R> Semantic<K,V,R> invoke(org.cache2k.processor.EntryProcessor<K,V,R> processor)
-
-