类 RedisRefDataCacheOperations
java.lang.Object
cn.filaura.weave.cache.ref.RedisRefDataCacheOperations
- 所有已实现的接口:
RefDataCacheOperations
使用RedisTemplate完成引用缓存操作
-
构造器概要
构造器构造器说明RedisRefDataCacheOperations(org.springframework.data.redis.core.RedisTemplate<String, String> redisTemplate) -
方法概要
修饰符和类型方法说明void缓存单个引用数据,并设置过期时间。void批量缓存引用数据,并设置过期时间。voidexpireRef(Collection<String> keys, long seconds) 批量设置缓存过期时间。intloadRef(Collection<String> keys) 批量加载引用数据。long删除单个引用缓存。longremoveRef(Collection<String> keys) 批量删除引用缓存。voidsetRandomUpperBound(int upperBound) voidsetRedisTemplate(org.springframework.data.redis.core.RedisTemplate<String, String> redisTemplate)
-
构造器详细资料
-
RedisRefDataCacheOperations
-
-
方法详细资料
-
cacheRef
从接口复制的说明:RefDataCacheOperations缓存单个引用数据,并设置过期时间。- 指定者:
cacheRef在接口中RefDataCacheOperations- 参数:
key- 缓存的键record- 供引用的数据seconds- 过期时间(秒)
-
cacheRef
从接口复制的说明:RefDataCacheOperations批量缓存引用数据,并设置过期时间。- 指定者:
cacheRef在接口中RefDataCacheOperations- 参数:
recordMap- 包含多条引用数据的Map,key为缓存键,value为引用数据seconds- 过期时间(秒)
-
loadRef
从接口复制的说明:RefDataCacheOperations批量加载引用数据。返回值的数量与顺序应与参数keys一致
- 指定者:
loadRef在接口中RefDataCacheOperations- 参数:
keys- 缓存的键集合- 返回:
- 引用数据列表(数量与顺序应与参数keys一致)
-
expireRef
从接口复制的说明:RefDataCacheOperations批量设置缓存过期时间。- 指定者:
expireRef在接口中RefDataCacheOperations- 参数:
keys- 缓存的键集合seconds- 过期时间(秒)
-
removeRef
从接口复制的说明:RefDataCacheOperations删除单个引用缓存。- 指定者:
removeRef在接口中RefDataCacheOperations- 参数:
key- 缓存的键- 返回:
- 返回删除操作的结果
-
removeRef
从接口复制的说明:RefDataCacheOperations批量删除引用缓存。- 指定者:
removeRef在接口中RefDataCacheOperations- 参数:
keys- 缓存的键集合- 返回:
- 返回删除操作的结果数量
-
getRandomUpperBound
public int getRandomUpperBound() -
setRandomUpperBound
public void setRandomUpperBound(int upperBound) -
getRedisTemplate
-
setRedisTemplate
-