public class EhCacheAdapter<K extends Serializable,V> extends Object implements SimpleCache<K,V>
Thread-safety is taken care of by the underlying Ehcache instance.
org.springframework.cache.ehcache.EhCacheFactoryBean,
org.springframework.cache.ehcache.EhCacheManagerFactoryBean| Constructor and Description |
|---|
EhCacheAdapter() |
public void setCache(net.sf.ehcache.Cache cache)
cache - the backing Ehcache instancepublic 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.