public class RedisUtils<K,V> extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
<H extends K,HK,HV> |
delMap(H hashKey,
HK key) |
org.springframework.data.redis.core.RedisTemplate |
gaveRedisTemplate(org.springframework.data.redis.core.RedisTemplate restemp) |
static RedisUtils |
getInstance() |
static RedisUtils |
getInstance(org.springframework.data.redis.core.RedisTemplate redisTemplate) |
List |
getList(K hashKey) |
Map |
getMap(K hashKey) |
Object |
getMap(K hashKey,
Object key) |
Boolean |
getOnfCacheInThread() |
Set |
getSet(K hashKey) |
Object |
getValue(K hashKey) |
List |
getZSet(K hashKey) |
List |
getZSetAsync(K hashKey) |
List |
getZSetByRange(K hashKey,
Long start,
Long end) |
Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple> |
getZSetWithScores(K hashKey) |
List |
leftPopList(K hashKey,
Long count) |
boolean |
lock(Object lockObj) |
boolean |
lock(Object lockObj,
Boolean isAgress) |
org.springframework.data.redis.core.RedisTemplate |
obtainRedisTemplate() |
Boolean |
onfCacheInThread(Boolean flag) |
Boolean |
pushList(K hashKey,
V object) |
Boolean |
pushListLeft(K hashKey,
V object) |
<H extends K,HK,HV> |
pushMap(H hashKey,
HK key,
HV value) |
Boolean |
pushMap(K hashKey,
Map map) |
Boolean |
putSet(K hashKey,
Set<V> set) |
Boolean |
putSet(K hashKey,
V... value) |
Boolean |
putSet(K hashKey,
V value) |
Boolean |
putZSet(K hashKey,
Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<V>> set) |
Boolean |
putZSet(K hashKey,
V value,
Double score) |
Boolean |
remove(K hashKey) |
List |
rightPopList(K hashKey,
Long count) |
Boolean |
setValue(K hashKey,
V value) |
Boolean |
setValue(K hashKey,
V value,
Long timeOut,
TimeUnit timeUnit) |
boolean |
tryLock(Object lockObj) |
boolean |
unlock(Object lockObj) |
boolean |
unTryLock(Object lockObj) |
public Boolean getOnfCacheInThread()
public org.springframework.data.redis.core.RedisTemplate gaveRedisTemplate(org.springframework.data.redis.core.RedisTemplate restemp)
public boolean unlock(Object lockObj)
public boolean tryLock(Object lockObj)
public boolean unTryLock(Object lockObj)
public boolean lock(Object lockObj)
public org.springframework.data.redis.core.RedisTemplate obtainRedisTemplate()
public Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple> getZSetWithScores(K hashKey)
public Boolean putZSet(K hashKey, Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<V>> set)
public static RedisUtils getInstance(org.springframework.data.redis.core.RedisTemplate redisTemplate)
public static RedisUtils getInstance()
Copyright © 2024. All rights reserved.