Modifier and Type | Method and Description |
---|---|
ICacheMap |
expire(long expire)
设置默认超时时间
|
default V |
get(Object key)
获取对象
不会刷新对象的时间戳
|
default V |
get(Object key,
Function<K,V> appointedSupplier)
获取对象
不会刷新对象的时间戳
|
default V |
get(Object key,
Function<K,V> appointedSupplier,
Long expire) |
V |
get(Object key,
Function<K,V> appointedSupplier,
Long createExpire,
boolean refresh)
获取对象
不会刷新对象的时间戳
|
default V |
getAndRefresh(Object key)
获取并刷新对象
|
default V |
getAndRefresh(Object key,
Function<K,V> appointedSupplier)
获取并刷新对象
|
default V |
getAndRefresh(Object key,
Function<K,V> appointedSupplier,
Long expire)
获取并刷新对象
|
long |
getExpire()
获取默认超时时间
|
Function<K,V> |
getSupplier()
获取数据创建 Function 对象
|
long |
getTTL(K key)
为 Key 获取 key 的超时时间
|
V |
put(K key,
V value,
long expire) |
void |
putAll(Map<? extends K,? extends V> map,
long expire) |
V |
putIfAbsent(K key,
V value,
long expire) |
boolean |
setTTL(K key,
long expire)
更新某个 Key 的超时时间
可以为某个没有配置超时时间的键值对配置超时时间
|
ICacheMap<K,V> |
supplier(Function<K,V> buildFunction)
设置数据创建 Function 对象
|
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
ICacheMap<K,V> supplier(Function<K,V> buildFunction)
buildFunction
- Function 对象long getExpire()
ICacheMap expire(long expire)
expire
- 超时时间long getTTL(K key)
key
- key 名称boolean setTTL(K key, long expire)
key
- 键expire
- 超时时间V get(Object key, Function<K,V> appointedSupplier, Long createExpire, boolean refresh)
key
- 键appointedSupplier
- 指定的获取器createExpire
- 超时时间refresh
- 刷新超时时间default V get(Object key, Function<K,V> appointedSupplier)
key
- 键appointedSupplier
- 指定的获取器default V getAndRefresh(Object key, Function<K,V> appointedSupplier, Long expire)
key
- 键appointedSupplier
- 指定数据构造器expire
- 超时时间default V getAndRefresh(Object key, Function<K,V> appointedSupplier)
key
- 键appointedSupplier
- 指定数据构造器Copyright © 2020 Voovan. All rights reserved.