public class MemCacheService extends java.lang.Object implements CacheService
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.String |
_cacheKeyHead |
protected int |
_defaultSeconds |
protected boolean |
_enableMd5key |
protected net.spy.memcached.MemcachedClient |
client |
构造器和说明 |
---|
MemCacheService(net.spy.memcached.MemcachedClient client,
int defSeconds) |
MemCacheService(net.spy.memcached.MemcachedClient client,
java.lang.String keyHeader,
int defSeconds) |
MemCacheService(java.util.Properties prop) |
MemCacheService(java.util.Properties prop,
java.lang.String keyHeader,
int defSeconds) |
限定符和类型 | 方法和说明 |
---|---|
net.spy.memcached.MemcachedClient |
client() |
MemCacheService |
enableMd5key(boolean enable) |
<T> T |
get(java.lang.String key,
java.lang.reflect.Type type)
获取
|
protected java.lang.String |
newKey(java.lang.String key) |
void |
remove(java.lang.String key)
移除
|
void |
store(java.lang.String key,
java.lang.Object obj,
int seconds)
保存
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getOrStore
protected java.lang.String _cacheKeyHead
protected int _defaultSeconds
protected boolean _enableMd5key
protected final net.spy.memcached.MemcachedClient client
public MemCacheService(net.spy.memcached.MemcachedClient client, int defSeconds)
public MemCacheService(net.spy.memcached.MemcachedClient client, java.lang.String keyHeader, int defSeconds)
public MemCacheService(java.util.Properties prop)
public MemCacheService(java.util.Properties prop, java.lang.String keyHeader, int defSeconds)
public MemCacheService enableMd5key(boolean enable)
public net.spy.memcached.MemcachedClient client()
public void store(java.lang.String key, java.lang.Object obj, int seconds)
CacheService
store
在接口中 CacheService
key
- 缓存键obj
- 对象seconds
- 秒数public <T> T get(java.lang.String key, java.lang.reflect.Type type)
CacheService
get
在接口中 CacheService
key
- 缓存键public void remove(java.lang.String key)
CacheService
remove
在接口中 CacheService
key
- 缓存键protected java.lang.String newKey(java.lang.String key)