play.cache
Class MemcachedImpl
java.lang.Object
play.cache.MemcachedImpl
- All Implemented Interfaces:
- CacheImpl
public class MemcachedImpl
- extends Object
- implements CacheImpl
Memcached implementation (using http://code.google.com/p/spymemcached/)
|
Method Summary |
void |
add(String key,
Object value,
int expiration)
|
void |
clear()
|
long |
decr(String key,
int by)
|
void |
delete(String key)
|
Object |
get(String key)
|
Map<String,Object> |
get(String[] keys)
|
static MemcachedImpl |
getInstance()
|
long |
incr(String key,
int by)
|
void |
replace(String key,
Object value,
int expiration)
|
boolean |
safeAdd(String key,
Object value,
int expiration)
|
boolean |
safeDelete(String key)
|
boolean |
safeReplace(String key,
Object value,
int expiration)
|
boolean |
safeSet(String key,
Object value,
int expiration)
|
void |
set(String key,
Object value,
int expiration)
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static MemcachedImpl getInstance()
throws IOException
- Throws:
IOException
add
public void add(String key,
Object value,
int expiration)
- Specified by:
add in interface CacheImpl
get
public Object get(String key)
- Specified by:
get in interface CacheImpl
clear
public void clear()
- Specified by:
clear in interface CacheImpl
delete
public void delete(String key)
- Specified by:
delete in interface CacheImpl
get
public Map<String,Object> get(String[] keys)
- Specified by:
get in interface CacheImpl
incr
public long incr(String key,
int by)
- Specified by:
incr in interface CacheImpl
decr
public long decr(String key,
int by)
- Specified by:
decr in interface CacheImpl
replace
public void replace(String key,
Object value,
int expiration)
- Specified by:
replace in interface CacheImpl
safeAdd
public boolean safeAdd(String key,
Object value,
int expiration)
- Specified by:
safeAdd in interface CacheImpl
safeDelete
public boolean safeDelete(String key)
- Specified by:
safeDelete in interface CacheImpl
safeReplace
public boolean safeReplace(String key,
Object value,
int expiration)
- Specified by:
safeReplace in interface CacheImpl
safeSet
public boolean safeSet(String key,
Object value,
int expiration)
- Specified by:
safeSet in interface CacheImpl
set
public void set(String key,
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