|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectnet.paoding.rose.jade.statement.cached.MockCache
public class MockCache
提供 ConcurrentHashMap 缓存池的 CacheInterface 实现。
| 构造方法摘要 | |
|---|---|
MockCache(String poolName)
|
|
MockCache(String poolName,
int maxSize)
|
|
| 方法摘要 | |
|---|---|
boolean |
delete(String key)
从 Cache 缓存池删除对象。 |
Object |
get(String key)
从缓存取出给定key对应的对象,如果没有则返回null |
int |
getMaxSize()
|
boolean |
set(String key,
Object value,
int expiry)
将某个对象和给定的key绑定起来存储在缓存中 |
void |
setMaxSize(int maxSize)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public MockCache(String poolName)
public MockCache(String poolName,
int maxSize)
| 方法详细信息 |
|---|
public int getMaxSize()
public void setMaxSize(int maxSize)
public Object get(String key)
CacheInterface 复制的描述
CacheInterface 中的 get
public boolean set(String key,
Object value,
int expiry)
CacheInterface 复制的描述
CacheInterface 中的 setexpiry - - 缓存过期时间,单位为秒public boolean delete(String key)
CacheInterface 复制的描述
CacheInterface 中的 deletekey - - 缓存关键字
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||