public class LocalCacheService extends Object implements CacheService
| 限定符和类型 | 字段和说明 |
|---|---|
static CacheService |
instance |
| 构造器和说明 |
|---|
LocalCacheService() |
LocalCacheService(int defSeconds) |
LocalCacheService(Properties prop) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
表空
|
<T> T |
get(String key,
Type type)
获取
|
int |
getDefalutSeconds() |
void |
remove(String key)
移除
|
void |
store(String key,
Object obj,
int seconds)
保存
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, get, getOrStorepublic static final CacheService instance
public LocalCacheService()
public LocalCacheService(int defSeconds)
public LocalCacheService(Properties prop)
public void store(String key, Object obj, int seconds)
store 在接口中 CacheServicekey - 缓存键obj - 对象seconds - 秒数public <T> T get(String key, Type type)
get 在接口中 CacheServicekey - 缓存键public void remove(String key)
remove 在接口中 CacheServicekey - 缓存键public void clear()
public int getDefalutSeconds()
Copyright © 2024. All rights reserved.