public class RedisSessionRepository extends Object implements SessionRepository<com.networknt.session.redis.RedisSessionRepository.RedisSession>
SessionRepository implementation that stores
sessions in Redis repository.| Modifier and Type | Field and Description |
|---|---|
static org.redisson.config.Config |
config |
| Constructor and Description |
|---|
RedisSessionRepository() |
| Modifier and Type | Method and Description |
|---|---|
com.networknt.session.redis.RedisSessionRepository.RedisSession |
createSession() |
void |
deleteById(String id) |
com.networknt.session.redis.RedisSessionRepository.RedisSession |
findById(String id) |
Map<String,MapSession> |
getSessions() |
void |
save(com.networknt.session.redis.RedisSessionRepository.RedisSession session) |
void |
setDefaultMaxInactiveInterval(int defaultMaxInactiveInterval)
Set the maximum inactive interval in seconds between requests before newly created
sessions will be invalidated.
|
void |
setRedisFlushMode(RedisFlushMode redisFlushMode)
Sets the Hazelcast flush mode.
|
public void setDefaultMaxInactiveInterval(int defaultMaxInactiveInterval)
defaultMaxInactiveInterval - the maximum inactive interval in secondspublic void setRedisFlushMode(RedisFlushMode redisFlushMode)
RedisFlushMode.ON_SAVE.redisFlushMode - the new Redis flush modepublic com.networknt.session.redis.RedisSessionRepository.RedisSession createSession()
createSession in interface SessionRepository<com.networknt.session.redis.RedisSessionRepository.RedisSession>public void save(com.networknt.session.redis.RedisSessionRepository.RedisSession session)
save in interface SessionRepository<com.networknt.session.redis.RedisSessionRepository.RedisSession>public com.networknt.session.redis.RedisSessionRepository.RedisSession findById(String id)
findById in interface SessionRepository<com.networknt.session.redis.RedisSessionRepository.RedisSession>public void deleteById(String id)
deleteById in interface SessionRepository<com.networknt.session.redis.RedisSessionRepository.RedisSession>public Map<String,MapSession> getSessions()
Copyright © 2020. All rights reserved.