public interface CacheMap<K,V>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
清除所有缓存对象
|
int |
eliminate()
淘汰对象
|
V |
get(K key)
查找缓存对象
|
int |
getCacheSize()
返回缓存大小
|
long |
getDefaultExpire()
返回默认存活时间
|
boolean |
isEmpty()
缓存中是否为空
|
boolean |
isFull()
缓存是否已经满
|
void |
put(K key,
V value)
向缓存添加value对象,其在缓存中生存时间为默认值
|
void |
put(K key,
V value,
long expire)
向缓存添加value对象,并指定存活时间
|
void |
remove(K key)
删除缓存对象
|
int |
size()
返回当前缓存的大小
|
int size()
long getDefaultExpire()
int eliminate()
boolean isFull()
void remove(K key)
key - void clear()
int getCacheSize()
boolean isEmpty()
Copyright © 2016. All rights reserved.