类 LogCacheHelper
java.lang.Object
com.sie.mbm.mom.framework.cache.LogCacheHelper
RedisHelper类
-
字段概要
字段修饰符和类型字段说明private final ICacheHelperprivate static final AtomicLongprivate static ICacheHelper(专用程序包) static final intprivate static final ExecutorServiceprivate static final int -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidconvertAndSend(String channel, Object message) 发送消息static boolean删除给定键static Object获取给定键的值static org.springframework.data.redis.core.Cursor<String> getScan(org.springframework.data.redis.core.ScanOptions options) 查询所有keyvoidinit()static void在列表的左侧添加元素static void设置键值对,并设置过期时间
-
字段详细资料
-
INSTANCE
-
iCacheHelper
-
singleThreadExecutor
-
MAX_LOG_COUNT
static final int MAX_LOG_COUNT- 另请参阅:
-
TRIM_EVERY_N_INSERTS
private static final int TRIM_EVERY_N_INSERTS- 另请参阅:
-
INSERT_COUNTER
-
-
构造器详细资料
-
LogCacheHelper
public LogCacheHelper()
-
-
方法详细资料
-
init
@PostConstruct public void init() -
lpush
在列表的左侧添加元素- 参数:
key- 列表名value- 元素值
-
set
设置键值对,并设置过期时间- 参数:
key- Redis键value- 值timeout- 过期时间,以秒为单位
-
del
删除给定键- 参数:
key- Redis键- 返回:
- 删除操作是否成功
-
get
获取给定键的值- 参数:
key- Redis键- 返回:
- 值
-
getScan
public static org.springframework.data.redis.core.Cursor<String> getScan(org.springframework.data.redis.core.ScanOptions options) 查询所有key- 参数:
options- Redis键- 返回:
- 查询所有key
-
convertAndSend
发送消息- 参数:
channel- 频道message- 消息
-