public class InMemoryCacheImpl extends AbstractCache
Constructor and Description |
---|
InMemoryCacheImpl(CacheDescriptor desc) |
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
|
com.google.common.cache.Cache<String,Serializable> |
getGuavaCache()
Get the instance cache
|
void |
invalidate(String key)
Invalidate the given key
|
void |
invalidateAll()
Invalidate all key-value stored in the cache
|
void |
put(String key,
Serializable value)
Put method to store a
Serializable value |
getName
public InMemoryCacheImpl(CacheDescriptor desc)
public com.google.common.cache.Cache<String,Serializable> getGuavaCache()
public Serializable get(String key)
Cache
key
- the string keySerializable
value, return null if the key does not
exist or if the key is nullpublic void invalidate(String key)
Cache
public void invalidateAll()
Cache
public void put(String key, Serializable value)
Cache
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 © 2014 Nuxeo SA. All rights reserved.