Package com.logicaldoc.util.cache
Class EhCache<K extends Serializable,V>
- java.lang.Object
-
- com.logicaldoc.util.cache.EhCache<K,V>
-
- All Implemented Interfaces:
Cache<K,V>
public class EhCache<K extends Serializable,V> extends Object implements Cache<K,V>
A thin adapter for Ehcache support.Thread-safety is taken care of by the underlying Ehcache instance.
see org.springframework.cache.ehcache.EhCacheFactoryBean
see org.springframework.cache.ehcache.EhCacheManagerFactoryBean
-
-
Constructor Summary
Constructors Constructor Description EhCache(net.sf.ehcache.Cache cache)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontains(K key)voidflush()Vget(K key)Collection<K>getKeys()static net.sf.ehcache.CacheManagergetManager()longgetSize()voidput(K key, V value)static voidreloadManager()voidremove(K key)
-
-
-
Method Detail
-
contains
public boolean contains(K key)
- Specified by:
containsin interfaceCache<K extends Serializable,V>
-
getKeys
public Collection<K> getKeys()
- Specified by:
getKeysin interfaceCache<K extends Serializable,V>
-
put
public void put(K key, V value)
- Specified by:
putin interfaceCache<K extends Serializable,V>
-
remove
public void remove(K key)
- Specified by:
removein interfaceCache<K extends Serializable,V>
-
clear
public void clear()
- Specified by:
clearin interfaceCache<K extends Serializable,V>
-
flush
public void flush()
- Specified by:
flushin interfaceCache<K extends Serializable,V>
-
getSize
public long getSize()
- Specified by:
getSizein interfaceCache<K extends Serializable,V>
-
reloadManager
public static final void reloadManager()
-
getManager
public static final net.sf.ehcache.CacheManager getManager()
-
-