类 StringCache<T>

所有已实现的接口:
IBaseCache, IRedisCache, IStringCache<T>, IValueCache<T>, AutoCloseable
直接已知子类:
DataDbCache, DistributedLockDbCache, ParamDbCache, SessionDbCache

public class StringCache<T> extends RedisCache implements IStringCache<T>
  • 构造器详细资料

    • StringCache

      public StringCache(String node, String item, org.springframework.data.redis.connection.RedisConnection redisConnection, ICacheKey cacheKey, String prefix, Class<T> clazz) throws Exception
      StringCache
      参数:
      node - 缓存key配置db节点
      item - 缓存key配置项
      redisConnection - RedisConnection
      cacheKey - ICacheKey
      prefix - 缓存前缀
      clazz - T.class
      抛出:
      Exception
  • 方法详细资料

    • get

      public T get(Object... args) throws Exception
      获取缓存
      指定者:
      get 在接口中 IStringCache<T>
      参数:
      args - 缓存key参数
      返回:
      抛出:
      Exception
    • set

      public boolean set(T m, OpWhen when, Object... args) throws Exception
      添加或更新
      指定者:
      set 在接口中 IStringCache<T>
      参数:
      m - 缓存数据
      when - when
      args - 缓存key参数
      返回:
      抛出:
      Exception
    • set

      public boolean set(T m, int expireSeconds, OpWhen when, Object... args) throws Exception
      添加或更新
      指定者:
      set 在接口中 IStringCache<T>
      参数:
      m - 缓存数据
      expireSeconds - 缓存有效时间,秒
      when - 操作类型
      args - 缓存key参数
      返回:
      抛出:
      Exception
    • increment

      public long increment(long incrementValue, Object... args) throws Exception
      原子增 T 必须是 int、 long
      指定者:
      increment 在接口中 IStringCache<T>
      参数:
      incrementValue - 增量
      args - 缓存key参数
      返回:
      抛出:
      Exception
    • decrement

      public long decrement(long decrementValue, Object... args) throws Exception
      原子减 T 必须是 int、 long
      指定者:
      decrement 在接口中 IStringCache<T>
      参数:
      decrementValue - 减量
      args - 原子减 T 必须是 int、 long
      返回:
      抛出:
      Exception