类 HashCache<TField,TValue>
java.lang.Object
cn.myafx.cache.base.BaseCache
cn.myafx.cache.base.RedisCache
cn.myafx.cache.base.HashCache<TField,TValue>
- 所有已实现的接口:
IBaseCache,IHashCache<TField,,TValue> IRedisCache,AutoCloseable
- 直接已知子类:
HashDbCache
-
嵌套类概要
嵌套类 -
字段概要
从类继承的字段 cn.myafx.cache.base.RedisCache
DefaultJsonMapper, keyConfig, mapper, nodeName, prefix, redis -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddOrUpdate(Map<TField, TValue> map, Object... args) 添加或更新数据longhash value 原子自减,TValue 必须是 long、int类型long移除hash keyboolean移除hash keyboolean是否存在hash key获取数据long获取hash key 数量获取hash key获取数据获取数据获取hash valuelonghash value 原子自增,TValue 必须是 long、int类型游标方式读取数据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
-
构造器详细资料
-
HashCache
public HashCache(String node, String item, org.springframework.data.redis.connection.RedisConnection redisConnection, ICacheKey cacheKey, String prefix, Class<TField> fieldClass, Class<TValue> valueClass) throws Exception HashCache- 参数:
node- 缓存key配置db节点item- 缓存key配置项redisConnection- RedisConnectioncacheKey- ICacheKeyprefix- 缓存前缀fieldClass- TField.classvalueClass- TValue.class- 抛出:
Exception
-
-
方法详细资料
-
set
添加或更新数据- 指定者:
set在接口中IHashCache<TField,TValue> - 参数:
field- hash keyvalue- hash valueargs- 缓存key参数- 返回:
- 抛出:
Exception
-
addOrUpdate
添加或更新数据- 指定者:
addOrUpdate在接口中IHashCache<TField,TValue> - 参数:
map- Mapargs- 缓存key参数- 抛出:
Exception
-
get
获取数据- 指定者:
get在接口中IHashCache<TField,TValue> - 参数:
args- 缓存key参数- 返回:
- 抛出:
Exception
-
getValue
获取数据- 指定者:
getValue在接口中IHashCache<TField,TValue> - 参数:
field- hash keyargs- 缓存key参数- 返回:
- 抛出:
Exception
-
getValue
获取数据- 指定者:
getValue在接口中IHashCache<TField,TValue> - 参数:
fields- hash keyargs- 缓存key参数- 返回:
- 抛出:
Exception
-
geTFields
获取hash key- 指定者:
geTFields在接口中IHashCache<TField,TValue> - 参数:
args- 缓存key参数- 返回:
- 抛出:
Exception
-
getValues
获取hash value- 指定者:
getValues在接口中IHashCache<TField,TValue> - 参数:
args- 缓存key参数- 返回:
- 抛出:
Exception
-
getCount
获取hash key 数量- 指定者:
getCount在接口中IHashCache<TField,TValue> - 参数:
args- 缓存key参数- 返回:
- 抛出:
Exception
-
exists
是否存在hash key- 指定者:
exists在接口中IHashCache<TField,TValue> - 参数:
field- hash keyargs- 缓存key参数- 返回:
- 抛出:
Exception
-
delete
移除hash key- 指定者:
delete在接口中IHashCache<TField,TValue> - 参数:
field- hash keyargs- 缓存key参数- 返回:
- 抛出:
Exception
-
delete
移除hash key- 指定者:
delete在接口中IHashCache<TField,TValue> - 参数:
fields- hash keyargs- 缓存key参数- 返回:
- 抛出:
Exception
-
increment
hash value 原子自增,TValue 必须是 long、int类型- 指定者:
increment在接口中IHashCache<TField,TValue> - 参数:
field- hash keyincrementValue- 增量args- 缓存key参数- 返回:
- 抛出:
Exception
-
decrement
hash value 原子自减,TValue 必须是 long、int类型- 指定者:
decrement在接口中IHashCache<TField,TValue> - 参数:
field- hash keydecrementValue- 自减量args- 缓存key参数- 返回:
- 抛出:
Exception
-
scan
public ICacheCursor<Map.Entry<TField,TValue>> scan(String pattern, int count, Object... args) throws Exception 游标方式读取数据- 指定者:
scan在接口中IHashCache<TField,TValue> - 参数:
pattern- 搜索表达式count- 游标页大小args- 缓存key参数- 返回:
- 抛出:
Exception
-