public interface Cache
Modifier and Type | Method and Description |
---|---|
Serializable |
get(String key)
Get method to retrieve value from cache Must not raise exception if the key is null, but return null
|
String |
getName()
Get cache name as specified in the descriptor
|
default boolean |
hasEntry(String key)
Check if a given key is present inside the cache.
|
void |
invalidate(String key)
Invalidate the given key
|
void |
invalidateAll()
Invalidate all key-value stored in the cache
|
Set<String> |
keySet()
Returns the set of all keys stored in the cache.
|
void |
put(String key,
Serializable value)
Put method to store a
Serializable value |
String getName()
Serializable get(String key)
key
- the string keySerializable
value, return null if the key does not exist or if the key is nullSet<String> keySet()
Set
of all keysvoid invalidate(String key)
key,
- the key to remove from the cache, if null will do nothingvoid invalidateAll()
void put(String key, Serializable value)
Serializable
valuekey
- the string key, if null, the value will not be storedvalue
- the value to store, if null, the value will not be storedCopyright © 2018 Nuxeo. All rights reserved.