public abstract class AbstractRedisBaseImp extends Object implements CacheBaseInterface
| 限定符和类型 | 字段和说明 |
|---|---|
protected Integer |
dbIndex |
private static org.slf4j.Logger |
log |
protected org.springframework.data.redis.core.RedisTemplate |
redisTemplate |
DEFALUTHEAD, DEFALUTSECRET, DEFALUTTIME| 构造器和说明 |
|---|
AbstractRedisBaseImp() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
boolean |
deleteCacheData(Object cacheKey) |
boolean |
exists(Object cacheKey) |
Object |
getCacheData(Object cacheKey) |
<T> T |
getCacheData(Object cacheKey,
Class<T> type) |
void |
init(String dbIndex) |
boolean |
releaseLock(Object lockKey,
Object serial) |
protected void |
selectDb(org.springframework.data.redis.connection.RedisConnection connection) |
boolean |
setCacheObjectData(Object cacheKey,
Object value,
long validTime,
boolean secret) |
void |
setRedisTemplate(org.springframework.data.redis.core.RedisTemplate redisTemplate) |
boolean |
tryLock(Object lockKey,
Object serial,
long expire) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetCacheObjectData, setCacheObjectData, setCacheObjectDataprivate static final org.slf4j.Logger log
protected Integer dbIndex
protected org.springframework.data.redis.core.RedisTemplate redisTemplate
@Autowired public void setRedisTemplate(org.springframework.data.redis.core.RedisTemplate redisTemplate)
public void init(String dbIndex)
protected void selectDb(org.springframework.data.redis.connection.RedisConnection connection)
public boolean exists(Object cacheKey)
public boolean setCacheObjectData(Object cacheKey, Object value, long validTime, boolean secret)
public boolean deleteCacheData(Object cacheKey)
public void clear()
Copyright © 2021. All rights reserved.