public class InMemoryIdempotentKeyStore extends AbstractIdempotentKeyStore
TimedCache 实现内存中的幂等键存储,主要功能包括: 1. 支持定时清理过期键 2. 支持并发安全 3.
支持自定义过期时间| 构造器和说明 |
|---|
InMemoryIdempotentKeyStore()
创建内存幂等键存储实例。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
remove(String key)
删除指定的幂等键。
|
boolean |
saveIfAbsent(String key,
long duration,
TimeUnit timeUnit)
当不存在有效 key 时将其存储下来。
|
buildIdempotentKeyCopyright © 2025. All rights reserved.