类 StringCache<T>
java.lang.Object
cn.myafx.cache.base.BaseCache
cn.myafx.cache.base.RedisCache
cn.myafx.cache.base.StringCache<T>
- 所有已实现的接口:
IBaseCache,IRedisCache,IStringCache<T>,IValueCache<T>,AutoCloseable
-
字段概要
从类继承的字段 cn.myafx.cache.base.RedisCache
DefaultJsonMapper, keyConfig, mapper, nodeName, prefix, redis -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明long原子减 T 必须是 int、 long获取缓存long原子增 T 必须是 int、 longboolean添加或更新boolean添加或更新从类继承的方法 cn.myafx.cache.base.RedisCache
close, contains, deserialize, expire, expire, getBytes, getCacheDb, getCacheKey, getDefault, getKeyConfig, getString, ping, remove, serialize, setJsonMapper从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 java.lang.AutoCloseable
close从接口继承的方法 cn.myafx.cache.base.IRedisCache
contains, expire, expire, getCacheDb, getCacheKey, getKeyConfig, ping, remove, setJsonMapper
-
构造器详细资料
-
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- RedisConnectioncacheKey- ICacheKeyprefix- 缓存前缀clazz- T.class- 抛出:
Exception
-
-
方法详细资料
-
get
获取缓存- 指定者:
get在接口中IStringCache<T>- 参数:
args- 缓存key参数- 返回:
- 抛出:
Exception
-
set
添加或更新- 指定者:
set在接口中IStringCache<T>- 参数:
m- 缓存数据when- whenargs- 缓存key参数- 返回:
- 抛出:
Exception
-
set
添加或更新- 指定者:
set在接口中IStringCache<T>- 参数:
m- 缓存数据expireSeconds- 缓存有效时间,秒when- 操作类型args- 缓存key参数- 返回:
- 抛出:
Exception
-
increment
原子增 T 必须是 int、 long- 指定者:
increment在接口中IStringCache<T>- 参数:
incrementValue- 增量args- 缓存key参数- 返回:
- 抛出:
Exception
-
decrement
原子减 T 必须是 int、 long- 指定者:
decrement在接口中IStringCache<T>- 参数:
decrementValue- 减量args- 原子减 T 必须是 int、 long- 返回:
- 抛出:
Exception
-