类 RedisRefDataCacheOperations

java.lang.Object
cn.filaura.weave.cache.ref.RedisRefDataCacheOperations
所有已实现的接口:
RefDataCacheOperations

public class RedisRefDataCacheOperations extends Object implements RefDataCacheOperations
使用RedisTemplate完成引用缓存操作
  • 构造器详细资料

    • RedisRefDataCacheOperations

      public RedisRefDataCacheOperations(org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate)
  • 方法详细资料

    • cacheRef

      public void cacheRef(String key, String record, long seconds)
      从接口复制的说明: RefDataCacheOperations
      缓存单个引用数据,并设置过期时间。
      指定者:
      cacheRef 在接口中 RefDataCacheOperations
      参数:
      key - 缓存的键
      record - 供引用的数据
      seconds - 过期时间(秒)
    • cacheRef

      public void cacheRef(Map<String,String> recordMap, long seconds)
      从接口复制的说明: RefDataCacheOperations
      批量缓存引用数据,并设置过期时间。
      指定者:
      cacheRef 在接口中 RefDataCacheOperations
      参数:
      recordMap - 包含多条引用数据的Map,key为缓存键,value为引用数据
      seconds - 过期时间(秒)
    • loadRef

      public List<String> loadRef(Collection<String> keys)
      从接口复制的说明: RefDataCacheOperations
      批量加载引用数据。

      返回值的数量与顺序应与参数keys一致

      指定者:
      loadRef 在接口中 RefDataCacheOperations
      参数:
      keys - 缓存的键集合
      返回:
      引用数据列表(数量与顺序应与参数keys一致)
    • expireRef

      public void expireRef(Collection<String> keys, long seconds)
      从接口复制的说明: RefDataCacheOperations
      批量设置缓存过期时间。
      指定者:
      expireRef 在接口中 RefDataCacheOperations
      参数:
      keys - 缓存的键集合
      seconds - 过期时间(秒)
    • removeRef

      public long removeRef(String key)
      从接口复制的说明: RefDataCacheOperations
      删除单个引用缓存。
      指定者:
      removeRef 在接口中 RefDataCacheOperations
      参数:
      key - 缓存的键
      返回:
      返回删除操作的结果
    • removeRef

      public long removeRef(Collection<String> keys)
      从接口复制的说明: RefDataCacheOperations
      批量删除引用缓存。
      指定者:
      removeRef 在接口中 RefDataCacheOperations
      参数:
      keys - 缓存的键集合
      返回:
      返回删除操作的结果数量
    • getRandomUpperBound

      public int getRandomUpperBound()
    • setRandomUpperBound

      public void setRandomUpperBound(int upperBound)
    • getRedisTemplate

      public org.springframework.data.redis.core.RedisTemplate<String,String> getRedisTemplate()
    • setRedisTemplate

      public void setRedisTemplate(org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate)