类 ReactiveRedisService
- java.lang.Object
-
- me.youm.core.redis.service.ReactiveRedisService
-
public class ReactiveRedisService extends Object
- 作者:
- youta
-
-
字段概要
字段 修饰符和类型 字段 说明 private org.springframework.data.redis.core.ReactiveRedisTemplate<String,Object>redisTemplate
-
构造器概要
构造器 构造器 说明 ReactiveRedisService()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<Long>del(String key)删除缓存reactor.core.publisher.Mono<Boolean>expire(String key, java.time.Duration timeout)指定缓存失效时间reactor.core.publisher.Mono<Object>get(String key)普通缓存获取reactor.core.publisher.Mono<Object>hashGet(String key, String item)HashGetreactor.core.publisher.Mono<Boolean>hashSet(String key, Map<String,Object> map)HashSetreactor.core.publisher.Mono<Boolean>hashSet(String key, Map<String,Object> map, java.time.Duration time)HashSet 并设置时间reactor.core.publisher.Mono<Boolean>hasKey(String key)判断 key是否存在reactor.core.publisher.Flux<Map.Entry<Object,Object>>hmget(String key)获取 hashKey对应的所有键值reactor.core.publisher.Mono<Boolean>set(String key, Object value)普通缓存放入reactor.core.publisher.Mono<Boolean>set(String key, Object value, java.time.Duration time)普通缓存放入并设置时间
-
-
-
方法详细资料
-
expire
public reactor.core.publisher.Mono<Boolean> expire(String key, java.time.Duration timeout)
指定缓存失效时间- 参数:
key- 键timeout- 时间(秒)- 返回:
- Boolean
-
hasKey
public reactor.core.publisher.Mono<Boolean> hasKey(String key)
判断 key是否存在- 参数:
key- 键- 返回:
- true 存在 false不存在
-
set
public reactor.core.publisher.Mono<Boolean> set(String key, Object value)
普通缓存放入- 参数:
key- 键value- 值- 返回:
- true成功 false失败
-
set
public reactor.core.publisher.Mono<Boolean> set(String key, Object value, java.time.Duration time)
普通缓存放入并设置时间- 参数:
key- 键value- 值time- 时间- 返回:
- true成功 false 失败
-
hashGet
public reactor.core.publisher.Mono<Object> hashGet(String key, String item)
HashGet- 参数:
key- 键 不能为 nullitem- 项 不能为 null- 返回:
- 值
-
hashSet
public reactor.core.publisher.Mono<Boolean> hashSet(String key, Map<String,Object> map)
HashSet- 参数:
key- 键map- 对应多个键值- 返回:
- true 成功 false 失败
-
hashSet
public reactor.core.publisher.Mono<Boolean> hashSet(String key, Map<String,Object> map, java.time.Duration time)
HashSet 并设置时间- 参数:
key- 键map- 对应多个键值time- 时间(秒)- 返回:
- true成功 false失败
-
-