|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.parthparekh.service.cache.EhCacheImpl
public class EhCacheImpl
Memcache cache implementation
Field Summary | |
---|---|
private net.sf.ehcache.Ehcache |
cache
|
private static org.slf4j.Logger |
logger
|
Constructor Summary | |
---|---|
EhCacheImpl()
|
Method Summary | ||
---|---|---|
boolean |
evict(java.lang.String key)
Removes data from cache with specified key |
|
|
get(java.lang.String key,
java.lang.Class<T> clazz)
Retrieves data from cache with specified key |
|
net.sf.ehcache.Ehcache |
getCache()
|
|
CacheType |
getType()
Returns the CacheType for the cache |
|
|
put(java.lang.String key,
T value)
Adds data to the cache |
|
|
put(java.lang.String key,
T value,
int ttl)
Adds data to the cache with specific ttl |
|
void |
removeAll()
|
|
void |
setCache(net.sf.ehcache.Ehcache cache)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.slf4j.Logger logger
private net.sf.ehcache.Ehcache cache
Constructor Detail |
---|
public EhCacheImpl()
Method Detail |
---|
public net.sf.ehcache.Ehcache getCache()
public void setCache(net.sf.ehcache.Ehcache cache)
public <T> boolean put(java.lang.String key, T value)
Cache
put
in interface Cache
key
- - cache keyvalue
- - value of object
public <T> boolean put(java.lang.String key, T value, int ttl)
Cache
put
in interface Cache
key
- - cache keyvalue
- - value of objectttl
- in seconds
public boolean evict(java.lang.String key)
Cache
evict
in interface Cache
key
- - cache key
public <T> T get(java.lang.String key, java.lang.Class<T> clazz)
Cache
get
in interface Cache
key
- - cache keyclazz
- - class type of object
public CacheType getType()
Cache
getType
in interface Cache
public void removeAll()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |