类 SaTokenDaoRedisFastjson2
java.lang.Object
cn.dev33.satoken.dao.SaTokenDaoRedisFastjson2
- 所有已实现的接口:
cn.dev33.satoken.dao.SaTokenDao
@Component
public class SaTokenDaoRedisFastjson2
extends Object
implements cn.dev33.satoken.dao.SaTokenDao
Sa-Token 持久层实现 [Redis存储、fastjson2序列化]
- 作者:
- sikadai
-
字段概要
字段修饰符和类型字段说明boolean标记:是否已初始化成功org.springframework.data.redis.core.StringRedisTemplateObject专用org.springframework.data.redis.core.StringRedisTemplateString专用从接口继承的字段 cn.dev33.satoken.dao.SaTokenDao
NEVER_EXPIRE, NOT_VALUE_EXPIRE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void删除ValuevoiddeleteObject(String key) 删除Object获取Value,如无返空获取Object,如无返空longgetObjectTimeout(String key) 获取Object的剩余存活时间 (单位: 秒)cn.dev33.satoken.session.SaSessiongetSession(String sessionId) longgetTimeout(String key) 获取Value的剩余存活时间 (单位: 秒)voidinit(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) searchData(String prefix, String keyword, int start, int size, boolean sortType) 搜索数据void写入Value,并设定存活时间 (单位: 秒)void写入Object,并设定存活时间 (单位: 秒)void修改指定key-value键值对 (过期时间不变)voidupdateObject(String key, Object object) 更新Object (过期时间不变)voidupdateObjectTimeout(String key, long timeout) 修改Object的剩余存活时间 (单位: 秒)voidupdateTimeout(String key, long timeout) 修改Value的剩余存活时间 (单位: 秒)从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.dev33.satoken.dao.SaTokenDao
deleteSession, getSessionTimeout, setSession, updateSession, updateSessionTimeout
-
字段详细资料
-
stringRedisTemplate
public org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplateString专用 -
objectRedisTemplate
public org.springframework.data.redis.core.StringRedisTemplate objectRedisTemplateObject专用 -
isInit
public boolean isInit标记:是否已初始化成功
-
-
构造器详细资料
-
SaTokenDaoRedisFastjson2
public SaTokenDaoRedisFastjson2()
-
-
方法详细资料
-
init
@Autowired public void init(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) -
get
获取Value,如无返空- 指定者:
get在接口中cn.dev33.satoken.dao.SaTokenDao
-
set
写入Value,并设定存活时间 (单位: 秒)- 指定者:
set在接口中cn.dev33.satoken.dao.SaTokenDao
-
update
修改指定key-value键值对 (过期时间不变)- 指定者:
update在接口中cn.dev33.satoken.dao.SaTokenDao
-
delete
删除Value- 指定者:
delete在接口中cn.dev33.satoken.dao.SaTokenDao
-
getTimeout
获取Value的剩余存活时间 (单位: 秒)- 指定者:
getTimeout在接口中cn.dev33.satoken.dao.SaTokenDao
-
updateTimeout
修改Value的剩余存活时间 (单位: 秒)- 指定者:
updateTimeout在接口中cn.dev33.satoken.dao.SaTokenDao
-
getObject
获取Object,如无返空- 指定者:
getObject在接口中cn.dev33.satoken.dao.SaTokenDao
-
getSession
- 指定者:
getSession在接口中cn.dev33.satoken.dao.SaTokenDao
-
setObject
写入Object,并设定存活时间 (单位: 秒)- 指定者:
setObject在接口中cn.dev33.satoken.dao.SaTokenDao
-
updateObject
更新Object (过期时间不变)- 指定者:
updateObject在接口中cn.dev33.satoken.dao.SaTokenDao
-
deleteObject
删除Object- 指定者:
deleteObject在接口中cn.dev33.satoken.dao.SaTokenDao
-
getObjectTimeout
获取Object的剩余存活时间 (单位: 秒)- 指定者:
getObjectTimeout在接口中cn.dev33.satoken.dao.SaTokenDao
-
updateObjectTimeout
修改Object的剩余存活时间 (单位: 秒)- 指定者:
updateObjectTimeout在接口中cn.dev33.satoken.dao.SaTokenDao
-
searchData
public List<String> searchData(String prefix, String keyword, int start, int size, boolean sortType) 搜索数据- 指定者:
searchData在接口中cn.dev33.satoken.dao.SaTokenDao
-