@ConditionalOnClass(value=org.redisson.Redisson.class) @Component public class BaseSessionService extends Object
| 构造器和说明 |
|---|
BaseSessionService() |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,Object> |
getSessionMapBySessionId(String sessionId,
long timeOut)
取得指定 Session 集合
|
<HK,HV> HV |
getSessionValue(String sessionId,
HK hashKey,
Class<HV> clazz)
取得 Session
|
Boolean |
removeSessionId(String sessionId)
删除指定 Session
|
<HK> void |
removeSessionKey(String sessionId,
HK hashKey)
删除指定 Session
|
<HK,HV> void |
setSessionValue(String sessionId,
HK hashKey,
HV hashValue,
long timeOut)
设置 Session 值
|
<HK,HV> Boolean |
setSessionValueIfAbsent(String sessionId,
HK hashKey,
HV hashValue,
int timeOut)
设置 Session 值 只有key 不存在才能设置成功
|
Boolean |
updateAccessTime(String sessionId,
long timeOut) |
public <HK,HV> void setSessionValue(String sessionId, HK hashKey, HV hashValue, long timeOut)
sessionId - hashKey - hashValue - public <HK,HV> Boolean setSessionValueIfAbsent(String sessionId, HK hashKey, HV hashValue, int timeOut)
sessionId - hashKey - hashValue - public <HK,HV> HV getSessionValue(String sessionId, HK hashKey, Class<HV> clazz)
sessionId - hashKey - public Map<String,Object> getSessionMapBySessionId(String sessionId, long timeOut)
sessionId - public <HK> void removeSessionKey(String sessionId, HK hashKey)
sessionId - hashKey - Copyright © 2021. All rights reserved.