public interface TimedCache<T> extends Map<String,T>, Closeable
| Modifier and Type | Method and Description |
|---|---|
Map<String,TimedCacheValue<T>> |
getStore()
获取存储容器
|
T |
put(String key,
T value,
long expireAfter)
添加并指定过期时间
|
T |
putIfAbsent(String key,
T value,
long expireAfter)
添加并指定过期时间
|
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesT put(String key, T value, long expireAfter)
key - keyvalue - valueexpireAfter - 自定义过期时间T putIfAbsent(String key, T value, long expireAfter)
key - keyvalue - valueexpireAfter - 自定义过期时间Map<String,TimedCacheValue<T>> getStore()
Copyright © 2025. All rights reserved.