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 void
clear()
boolean
contains(K key)
void
flush()
V
get(K key)
Collection<K>
getKeys()
static net.sf.ehcache.CacheManager
getManager()
long
getSize()
void
put(K key, V value)
static void
reloadManager()
void
remove(K key)
-
-
-
Method Detail
-
contains
public boolean contains(K key)
- Specified by:
contains
in interfaceCache<K extends Serializable,V>
-
getKeys
public Collection<K> getKeys()
- Specified by:
getKeys
in interfaceCache<K extends Serializable,V>
-
put
public void put(K key, V value)
- Specified by:
put
in interfaceCache<K extends Serializable,V>
-
remove
public void remove(K key)
- Specified by:
remove
in interfaceCache<K extends Serializable,V>
-
clear
public void clear()
- Specified by:
clear
in interfaceCache<K extends Serializable,V>
-
flush
public void flush()
- Specified by:
flush
in interfaceCache<K extends Serializable,V>
-
getSize
public long getSize()
- Specified by:
getSize
in interfaceCache<K extends Serializable,V>
-
reloadManager
public static final void reloadManager()
-
getManager
public static final net.sf.ehcache.CacheManager getManager()
-
-