|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
K
- the key typeV
- the value typepublic interface Jsr107Cache<K,V>
Bridge interface for enabling specific JSR-107 methods not available on Cache
.
Ehcache
users should not have to depend on this type but rely exclusively on the api types in package
javax.cache
.
Method Summary | |
---|---|
V |
compute(K key,
BiFunction<? super K,? super V,? extends V> computeFunction,
NullaryFunction<java.lang.Boolean> replaceEqual,
NullaryFunction<java.lang.Boolean> invokeWriter,
NullaryFunction<java.lang.Boolean> withStatsAndEvents)
Invokes the computeFunction passing in the current mapping for key and using the others functions
to specify some behaviours of the operation. |
java.util.Map<K,V> |
getAll(java.util.Set<? extends K> keys)
Get all mappings for the provided set of keys |
V |
getAndPut(K key,
V value)
Gets the previous value associated with the key and replaces the mapping using the provided value. |
V |
getAndRemove(K key)
Gets a value and removes it from this cache. |
void |
loadAll(java.util.Set<? extends K> keys,
boolean replaceExistingValues,
Function<java.lang.Iterable<? extends K>,java.util.Map<K,V>> function)
Invokes the cache loader for the given keys, optionally replacing the cache mappings with the loaded values. |
boolean |
remove(K key)
Removes the mapping associated with the provided key. |
void |
removeAll()
Removes all mapping from this cache. |
Method Detail |
---|
java.util.Map<K,V> getAll(java.util.Set<? extends K> keys)
keys
- the keys to retrieve
V getAndRemove(K key)
key
- the key to lookup
null
otherwiseV getAndPut(K key, V value)
key
- tje key to lookupvalue
- the new value
null
otherwiseboolean remove(K key)
key
- the key to lookup
true
if a mapping was removed, false
otherwisevoid removeAll()
V compute(K key, BiFunction<? super K,? super V,? extends V> computeFunction, NullaryFunction<java.lang.Boolean> replaceEqual, NullaryFunction<java.lang.Boolean> invokeWriter, NullaryFunction<java.lang.Boolean> withStatsAndEvents)
computeFunction
passing in the current mapping for key
and using the others functions
to specify some behaviours of the operation.
key
- the key to lookupcomputeFunction
- the function potentially mutating the mappingreplaceEqual
- should equal value be replacedinvokeWriter
- should the writer be invokedwithStatsAndEvents
- should statistics be updated and events fired
void loadAll(java.util.Set<? extends K> keys, boolean replaceExistingValues, Function<java.lang.Iterable<? extends K>,java.util.Map<K,V>> function)
keys
- the keys to laod value forreplaceExistingValues
- whether to update cache mappingsfunction
- the function performing the loading
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |