public abstract class CacheWrapper extends Object implements Cache
Modifier | Constructor and Description |
---|---|
protected |
CacheWrapper(Cache 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
|
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.
|
protected void |
onStop() |
void |
put(String key,
Serializable value)
Put method to store a
Serializable value |
void |
stop() |
protected CacheWrapper(Cache cache)
public void stop()
protected void onStop()
public String getName()
Cache
public Serializable get(String key)
Cache
get
in interface Cache
key
- the string keySerializable
value, return null if the key does not exist or if the key is nullpublic Set<String> keySet()
Cache
public void invalidate(String key)
Cache
invalidate
in interface Cache
public void invalidateAll()
Cache
invalidateAll
in interface Cache
public void put(String key, Serializable value)
Cache
Serializable
valueCopyright © 2017 Nuxeo. All rights reserved.