public class EhCacheWrapper extends AbstractListeningCacheWrapper implements BlockingCache
Constructor and Description |
---|
EhCacheWrapper(net.sf.ehcache.constructs.blocking.BlockingCache ehcache,
CacheMonitor cacheMonitor,
String name)
Deprecated.
since 5.3. Use
EhCacheWrapper(CacheModule, Ehcache, CacheMonitor, String) instead. |
EhCacheWrapper(CacheModule cacheModule,
net.sf.ehcache.Ehcache ehcache,
CacheMonitor cacheMonitor,
String name) |
EhCacheWrapper(net.sf.ehcache.Ehcache ehcache,
CacheMonitor cacheMonitor,
String name)
Deprecated.
since 5.3. Use
EhCacheWrapper(CacheModule, Ehcache, CacheMonitor, String) instead. |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
Object |
get(Object key) |
int |
getBlockingTimeout()
If the timeout is reached an exception is thrown to unlock the blocked thread (in
milliseconds).
|
List<Object> |
getKeys() |
String |
getName() |
Object |
getQuiet(Object key) |
int |
getSize() |
net.sf.ehcache.Ehcache |
getWrappedEhcache() |
boolean |
hasElement(Object key) |
void |
put(Object key,
Object value) |
void |
put(Object key,
Object value,
int timeToLiveInSeconds) |
void |
remove(Object key) |
void |
unlock(Object key)
Will unlock the key.
|
public EhCacheWrapper(CacheModule cacheModule, net.sf.ehcache.Ehcache ehcache, CacheMonitor cacheMonitor, String name)
public EhCacheWrapper(net.sf.ehcache.constructs.blocking.BlockingCache ehcache, CacheMonitor cacheMonitor, String name)
EhCacheWrapper(CacheModule, Ehcache, CacheMonitor, String)
instead.public EhCacheWrapper(net.sf.ehcache.Ehcache ehcache, CacheMonitor cacheMonitor, String name)
EhCacheWrapper(CacheModule, Ehcache, CacheMonitor, String)
instead.public Object get(Object key)
get
in interface Cache
get
in class AbstractListeningCacheWrapper
public Object getQuiet(Object key)
getQuiet
in interface Cache
getQuiet
in class AbstractListeningCacheWrapper
public boolean hasElement(Object key)
hasElement
in interface Cache
public void put(Object key, Object value)
put
in interface Cache
put
in class AbstractListeningCacheWrapper
public void put(Object key, Object value, int timeToLiveInSeconds)
put
in interface Cache
put
in class AbstractListeningCacheWrapper
public void remove(Object key)
remove
in interface Cache
remove
in class AbstractListeningCacheWrapper
public void clear()
clear
in interface Cache
clear
in class AbstractListeningCacheWrapper
public void unlock(Object key)
BlockingCache
unlock
in interface BlockingCache
public int getBlockingTimeout()
BlockingCache
getBlockingTimeout
in interface BlockingCache
public net.sf.ehcache.Ehcache getWrappedEhcache()
public String getName()
getName
in interface Cache
getName
in class AbstractListeningCacheWrapper
public int getSize()
getSize
in interface Cache
getSize
in class AbstractListeningCacheWrapper
Copyright © 2015 Magnolia International Ltd.. All rights reserved.