public class MemoryCache<K extends Serializable,V> extends Object implements SimpleCache<K,V>
ConcurrentHashMap.
Note: This cache is not transaction-safe. Use it for tests or wrap it appropriately.
| Constructor and Description |
|---|
MemoryCache() |
public boolean contains(K key)
contains in interface SimpleCache<K extends Serializable,V>key - the cache key to check up onpublic Collection<K> getKeys()
getKeys in interface SimpleCache<K extends Serializable,V>public V get(K key)
get in interface SimpleCache<K extends Serializable,V>public void put(K key, V value)
put in interface SimpleCache<K extends Serializable,V>key - the key against which to store the valuevalue - the value to store. null is allowed.public void remove(K key)
SimpleCacheremove in interface SimpleCache<K extends Serializable,V>key - the key value to removepublic void clear()
clear in interface SimpleCache<K extends Serializable,V>Copyright © 2005–2014 Alfresco Software. All rights reserved.