类 RedisServiceImpl
java.lang.Object
com.hengyi.xbaseweb.cache.service.impl.RedisServiceImpl
- 所有已实现的接口:
IRedisService
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void集合添加判断缓存中是否有对应的value读取缓存哈希获取数据void哈希 添加void列表添加void发布消息列表获取rangeByScore(String key, double source, double source1) 有序集合获取void删除对应的valuevoid批量删除对应的valuevoidremoveKeys(String pattern) voidremoveTransactional(String... keys) 批量删除对应的value (带事务,业务代码中用到事务,则需用此方法)写入缓存写入缓存设置时效时间setMembers(String key) 集合获取void加锁voidRedis 解锁void有序集合添加
-
构造器详细资料
-
RedisServiceImpl
public RedisServiceImpl()
-
-
方法详细资料
-
set
写入缓存- 指定者:
set在接口中IRedisService- 参数:
key-value-- 返回:
-
set
写入缓存设置时效时间- 指定者:
set在接口中IRedisService- 参数:
key-value-- 返回:
-
remove
批量删除对应的value- 指定者:
remove在接口中IRedisService- 参数:
keys-
-
removeTransactional
批量删除对应的value (带事务,业务代码中用到事务,则需用此方法)- 指定者:
removeTransactional在接口中IRedisService- 参数:
keys-
-
remove
删除对应的value- 指定者:
remove在接口中IRedisService- 参数:
key-
-
removeKeys
- 指定者:
removeKeys在接口中IRedisService
-
exists
判断缓存中是否有对应的value- 指定者:
exists在接口中IRedisService- 参数:
key-- 返回:
-
get
读取缓存- 指定者:
get在接口中IRedisService- 参数:
key-- 返回:
-
mget
- 指定者:
mget在接口中IRedisService
-
hmSet
哈希 添加- 指定者:
hmSet在接口中IRedisService- 参数:
key-hashKey-value-
-
hmGet
哈希获取数据- 指定者:
hmGet在接口中IRedisService- 参数:
key-hashKey-- 返回:
-
lPush
列表添加- 指定者:
lPush在接口中IRedisService- 参数:
k-v-
-
range
列表获取- 指定者:
range在接口中IRedisService- 参数:
k-l-l1-- 返回:
-
add
集合添加- 指定者:
add在接口中IRedisService- 参数:
key-value-
-
setMembers
集合获取- 指定者:
setMembers在接口中IRedisService- 参数:
key-- 返回:
-
zAdd
有序集合添加- 指定者:
zAdd在接口中IRedisService- 参数:
key-value-source-
-
rangeByScore
有序集合获取- 指定者:
rangeByScore在接口中IRedisService- 参数:
key-source-source1-- 返回:
-
tryLock
加锁- 指定者:
tryLock在接口中IRedisService- 参数:
key-
-
unLock
Redis 解锁- 指定者:
unLock在接口中IRedisService- 参数:
key-
-
publish
发布消息- 指定者:
publish在接口中IRedisService- 参数:
topic-msg-
-