play.cache
Class EhCacheImpl

java.lang.Object
  extended by 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.

See Also:
expiration is specified in seconds

Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)
Specified by:
add in interface CacheImpl

clear

public void clear()
Specified by:
clear in interface CacheImpl

decr

public long decr(java.lang.String key,
                 int by)
Specified by:
decr in interface CacheImpl

delete

public void delete(java.lang.String key)
Specified by:
delete in interface CacheImpl

get

public java.lang.Object get(java.lang.String key)
Specified by:
get in interface CacheImpl

get

public java.util.Map<java.lang.String,java.lang.Object> get(java.lang.String[] keys)
Specified by:
get in interface CacheImpl

incr

public long incr(java.lang.String key,
                 int by)
Specified by:
incr in interface CacheImpl

replace

public void replace(java.lang.String key,
                    java.lang.Object value,
                    int expiration)
Specified by:
replace in interface CacheImpl

safeAdd

public boolean safeAdd(java.lang.String key,
                       java.lang.Object value,
                       int expiration)
Specified by:
safeAdd in interface CacheImpl

safeDelete

public boolean safeDelete(java.lang.String key)
Specified by:
safeDelete in interface CacheImpl

safeReplace

public boolean safeReplace(java.lang.String key,
                           java.lang.Object value,
                           int expiration)
Specified by:
safeReplace in interface CacheImpl

safeSet

public boolean safeSet(java.lang.String key,
                       java.lang.Object value,
                       int expiration)
Specified by:
safeSet in interface CacheImpl

set

public void set(java.lang.String key,
                java.lang.Object value,
                int expiration)
Specified by:
set in interface CacheImpl

stop

public void stop()
Specified by:
stop in interface CacheImpl


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly