public class LocalCacheService extends java.lang.Object implements CacheService
限定符和类型 | 字段和说明 |
---|---|
static CacheService |
instance |
构造器和说明 |
---|
LocalCacheService() |
LocalCacheService(int defSeconds) |
LocalCacheService(java.util.Properties prop) |
限定符和类型 | 方法和说明 |
---|---|
void |
clear()
表空
|
<T> T |
get(java.lang.String key,
java.lang.reflect.Type type)
获取
|
int |
getDefalutSeconds() |
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
public static final CacheService instance
public LocalCacheService()
public LocalCacheService(int defSeconds)
public LocalCacheService(java.util.Properties prop)
public void store(java.lang.String key, java.lang.Object obj, int seconds)
store
在接口中 CacheService
key
- 缓存键obj
- 对象seconds
- 秒数public <T> T get(java.lang.String key, java.lang.reflect.Type type)
get
在接口中 CacheService
key
- 缓存键public void remove(java.lang.String key)
remove
在接口中 CacheService
key
- 缓存键public void clear()
public int getDefalutSeconds()