public class RedisTemplateOperationsUtil extends Object
| 构造器和说明 |
|---|
RedisTemplateOperationsUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <K,V> byte[] |
getRawKey(org.springframework.data.redis.core.RedisTemplate<K,?> redisTemplate,
Object key) |
static <K,V> byte[] |
rawValue(org.springframework.data.redis.core.RedisTemplate<K,?> redisTemplate,
Object value) |
static <K,V> Boolean |
setIfAbsent(org.springframework.data.redis.core.RedisTemplate<K,?> redisTemplate,
K key,
V value,
long timeout,
TimeUnit unit)
当key不存在时设置值
|
public static <K,V> Boolean setIfAbsent(org.springframework.data.redis.core.RedisTemplate<K,?> redisTemplate, K key, V value, long timeout, TimeUnit unit)
value - timeout - unit - public static <K,V> byte[] getRawKey(org.springframework.data.redis.core.RedisTemplate<K,?> redisTemplate,
Object key)
public static <K,V> byte[] rawValue(org.springframework.data.redis.core.RedisTemplate<K,?> redisTemplate,
Object value)
Copyright © 2020. All rights reserved.