public final class RedisHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.data.redis.connection.RedisConnectionFactory |
createRedisConnectionFactory(RedisProperties properties,
boolean initialize) |
static <K,V> org.springframework.data.redis.core.RedisTemplate<K,V> |
createRedisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory,
boolean initialize) |
static <K,V> org.springframework.data.redis.core.RedisTemplate<K,V> |
createRedisTemplate(RedisProperties properties,
boolean initialize) |
static <K,V> void |
deleteKey(org.springframework.data.redis.core.RedisTemplate<K,V> template,
K key) |
static <K,V> void |
deleteKey(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
K key) |
static <K,V> void |
deleteKeys(org.springframework.data.redis.core.RedisTemplate<K,V> template,
Collection<K> keys) |
static <K,V> void |
deleteKeys(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
Collection<K> keys) |
static <K,V> V |
getValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
K key) |
static <K,V> V |
getValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
K key) |
static <K,V> List<V> |
getValues(org.springframework.data.redis.core.RedisTemplate<K,V> template,
Collection<K> keys) |
static <K,V> List<V> |
getValues(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
Collection<K> keys) |
static <K,V> void |
setValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
K key,
V value) |
static <K,V> void |
setValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
K key,
V value,
long timeout,
TimeUnit timeunit) |
static <K,V> void |
setValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
K key,
V value) |
static <K,V> void |
setValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
K key,
V value,
long timeout,
TimeUnit timeunit) |
public static org.springframework.data.redis.connection.RedisConnectionFactory createRedisConnectionFactory(RedisProperties properties, boolean initialize) throws Exception
Exceptionpublic static <K,V> org.springframework.data.redis.core.RedisTemplate<K,V> createRedisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory,
boolean initialize)
public static <K,V> org.springframework.data.redis.core.RedisTemplate<K,V> createRedisTemplate(RedisProperties properties, boolean initialize) throws Exception
Exceptionpublic static <K,V> V getValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
K key)
public static <K,V> V getValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
K key)
public static <K,V> void setValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
K key,
V value,
long timeout,
TimeUnit timeunit)
public static <K,V> void setValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
K key,
V value,
long timeout,
TimeUnit timeunit)
public static <K,V> void setValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
K key,
V value)
public static <K,V> void setValue(org.springframework.data.redis.core.RedisTemplate<K,V> template,
K key,
V value)
public static <K,V> List<V> getValues(org.springframework.data.redis.core.RedisTemplate<K,V> template, String prefix, Collection<K> keys)
public static <K,V> List<V> getValues(org.springframework.data.redis.core.RedisTemplate<K,V> template, Collection<K> keys)
public static <K,V> void deleteKey(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
K key)
public static <K,V> void deleteKey(org.springframework.data.redis.core.RedisTemplate<K,V> template,
K key)
public static <K,V> void deleteKeys(org.springframework.data.redis.core.RedisTemplate<K,V> template,
String prefix,
Collection<K> keys)
public static <K,V> void deleteKeys(org.springframework.data.redis.core.RedisTemplate<K,V> template,
Collection<K> keys)
Copyright © 2023. All rights reserved.