public class ExpiredMap<K,V> extends Object
ExpiredMap时设置的,单位为秒.
如果当前时间离对象放入时间超过了阀值,则会被从map中移除掉.| 限定符和类型 | 字段和说明 |
|---|---|
protected static long |
SCAN_INTERVAL |
| 构造器和说明 |
|---|
ExpiredMap(int timeout) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
containsKey(K key) |
V |
get(K key) |
boolean |
isEmpty() |
void |
put(K key,
V value) |
V |
putIfAbsent(K key,
V value) |
V |
remove(K key) |
Copyright © 2016. All rights reserved.