Package play.cache
Class EhCacheImpl
- java.lang.Object
-
- play.cache.EhCacheImpl
-
- All Implemented Interfaces:
CacheImpl
public class EhCacheImpl extends java.lang.Object implements CacheImpl
EhCache implementation.Ehcache is an open source, standards-based cache used to boost performance, offload the database and simplify scalability. Ehcache is robust, proven and full-featured and this has made it the most widely-used Java-based cache.
Expiration is specified in seconds- See Also:
- http://ehcache.org/
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.String key, java.lang.Object value, int expiration)
void
clear()
long
decr(java.lang.String key, int by)
void
delete(java.lang.String key)
java.lang.Object
get(java.lang.String key)
java.util.Map<java.lang.String,java.lang.Object>
get(java.lang.String[] keys)
static EhCacheImpl
getInstance()
long
incr(java.lang.String key, int by)
static EhCacheImpl
newInstance()
void
replace(java.lang.String key, java.lang.Object value, int expiration)
boolean
safeAdd(java.lang.String key, java.lang.Object value, int expiration)
boolean
safeDelete(java.lang.String key)
boolean
safeReplace(java.lang.String key, java.lang.Object value, int expiration)
boolean
safeSet(java.lang.String key, java.lang.Object value, int expiration)
void
set(java.lang.String key, java.lang.Object value, int expiration)
void
stop()
-
-
-
Method Detail
-
getInstance
public static EhCacheImpl getInstance()
-
newInstance
public static EhCacheImpl newInstance()
-
add
public void add(java.lang.String key, java.lang.Object value, int expiration)
-
get
public java.util.Map<java.lang.String,java.lang.Object> get(java.lang.String[] keys)
-
replace
public void replace(java.lang.String key, java.lang.Object value, int expiration)
-
safeAdd
public boolean safeAdd(java.lang.String key, java.lang.Object value, int expiration)
-
safeDelete
public boolean safeDelete(java.lang.String key)
- Specified by:
safeDelete
in interfaceCacheImpl
-
safeReplace
public boolean safeReplace(java.lang.String key, java.lang.Object value, int expiration)
- Specified by:
safeReplace
in interfaceCacheImpl
-
safeSet
public boolean safeSet(java.lang.String key, java.lang.Object value, int expiration)
-
set
public void set(java.lang.String key, java.lang.Object value, int expiration)
-
-