Package org.redisson.tomcat
Class RedissonSessionManager
java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.session.ManagerBase
org.redisson.tomcat.RedissonSessionManager
- All Implemented Interfaces:
MBeanRegistration
,org.apache.catalina.JmxEnabled
,org.apache.catalina.Lifecycle
,org.apache.catalina.Manager
- Direct Known Subclasses:
JndiRedissonSessionManager
public class RedissonSessionManager
extends org.apache.catalina.session.ManagerBase
Redisson Session Manager for Apache Tomcat
- Author:
- Nikita Koksharov
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
Nested classes/interfaces inherited from class org.apache.catalina.session.ManagerBase
org.apache.catalina.session.ManagerBase.SessionTiming
Nested classes/interfaces inherited from interface org.apache.catalina.Lifecycle
org.apache.catalina.Lifecycle.SingleUse
-
Field Summary
Fields inherited from class org.apache.catalina.session.ManagerBase
duplicates, expiredSessions, maxActive, maxActiveSessions, processExpiresFrequency, processingTime, rejectedSessions, secureRandomAlgorithm, secureRandomClass, secureRandomProvider, sessionCounter, sessionCreationTiming, sessionExpirationTiming, sessionIdGenerator, sessionIdGeneratorClass, sessionMaxAliveTime, sessions, sm, support, TIMING_STATS_CACHE_SIZE
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(org.apache.catalina.Session session) protected RedissonClient
org.apache.catalina.Session
org.apache.catalina.Session
createSession
(String sessionId) org.apache.catalina.Session
findSession
(String id) getName()
getNotifiedNodes
(String sessionId) getTopic()
boolean
boolean
void
load()
void
remove
(org.apache.catalina.Session session, boolean update) void
setBroadcastSessionEvents
(boolean replicateSessionEvents) void
setBroadcastSessionUpdates
(boolean broadcastSessionUpdates) void
setConfigPath
(String configPath) void
setKeyPrefix
(String keyPrefix) void
setReadMode
(String readMode) void
setUpdateMode
(String updateMode) protected void
protected void
protected void
void
store
(jakarta.servlet.http.HttpSession session) void
unload()
Methods inherited from class org.apache.catalina.session.ManagerBase
addPropertyChangeListener, backgroundProcess, changeSessionId, changeSessionId, expireSession, findSessions, generateSessionId, getActiveSessions, getClassName, getContext, getCreationTime, getCreationTimestamp, getDomainInternal, getDuplicates, getEngine, getExpiredSessions, getJvmRoute, getLastAccessedTime, getLastAccessedTimestamp, getMaxActive, getMaxActiveSessions, getNewSession, getNotifyAttributeListenerOnUnchangedValue, getNotifyBindingListenerOnUnchangedValue, getObjectNameKeyProperties, getPersistAuthentication, getProcessExpiresFrequency, getProcessingTime, getRejectedSessions, getSecureRandomAlgorithm, getSecureRandomClass, getSecureRandomProvider, getSession, getSessionActivityCheck, getSessionAttribute, getSessionAttributeNameFilter, getSessionAttributeNamePattern, getSessionAttributeValueClassNameFilter, getSessionAttributeValueClassNamePattern, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdGenerator, getSessionLastAccessAtStart, getSessionMaxAliveTime, getThisAccessedTime, getThisAccessedTimestamp, getWarnOnSessionAttributeFilterFailure, initInternal, listSessionIds, processExpires, remove, removePropertyChangeListener, rotateSessionId, setContext, setDuplicates, setExpiredSessions, setMaxActive, setMaxActiveSessions, setNotifyAttributeListenerOnUnchangedValue, setNotifyBindingListenerOnUnchangedValue, setPersistAuthentication, setProcessExpiresFrequency, setProcessingTime, setSecureRandomAlgorithm, setSecureRandomClass, setSecureRandomProvider, setSessionActivityCheck, setSessionAttributeNameFilter, setSessionAttributeValueClassNameFilter, setSessionCounter, setSessionIdGenerator, setSessionLastAccessAtStart, setSessionMaxAliveTime, setWarnOnSessionAttributeFilterFailure, toString, updateSessionMaxAliveTime, willAttributeDistribute
Methods inherited from class org.apache.catalina.util.LifecycleMBeanBase
destroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregister
Methods inherited from class org.apache.catalina.util.LifecycleBase
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
-
Field Details
-
redisson
-
keyPrefix
-
-
Constructor Details
-
RedissonSessionManager
public RedissonSessionManager()
-
-
Method Details
-
getNodeId
-
getUpdateMode
-
setUpdateMode
-
isBroadcastSessionEvents
public boolean isBroadcastSessionEvents() -
setBroadcastSessionEvents
public void setBroadcastSessionEvents(boolean replicateSessionEvents) -
isBroadcastSessionUpdates
public boolean isBroadcastSessionUpdates() -
setBroadcastSessionUpdates
public void setBroadcastSessionUpdates(boolean broadcastSessionUpdates) -
getReadMode
-
setReadMode
-
setConfigPath
-
getConfigPath
-
getKeyPrefix
-
setKeyPrefix
-
getName
- Overrides:
getName
in classorg.apache.catalina.session.ManagerBase
-
load
- Throws:
ClassNotFoundException
IOException
-
unload
- Throws:
IOException
-
createSession
- Specified by:
createSession
in interfaceorg.apache.catalina.Manager
- Overrides:
createSession
in classorg.apache.catalina.session.ManagerBase
-
getNotifiedNodes
-
getMap
-
getTopic
-
findSession
- Specified by:
findSession
in interfaceorg.apache.catalina.Manager
- Overrides:
findSession
in classorg.apache.catalina.session.ManagerBase
- Throws:
IOException
-
createEmptySession
public org.apache.catalina.Session createEmptySession()- Specified by:
createEmptySession
in interfaceorg.apache.catalina.Manager
- Overrides:
createEmptySession
in classorg.apache.catalina.session.ManagerBase
-
remove
public void remove(org.apache.catalina.Session session, boolean update) - Specified by:
remove
in interfaceorg.apache.catalina.Manager
- Overrides:
remove
in classorg.apache.catalina.session.ManagerBase
-
add
public void add(org.apache.catalina.Session session) - Specified by:
add
in interfaceorg.apache.catalina.Manager
- Overrides:
add
in classorg.apache.catalina.session.ManagerBase
-
getRedisson
-
startInternal
protected void startInternal() throws org.apache.catalina.LifecycleException- Overrides:
startInternal
in classorg.apache.catalina.session.ManagerBase
- Throws:
org.apache.catalina.LifecycleException
-
buildClient
- Throws:
org.apache.catalina.LifecycleException
-
stopInternal
protected void stopInternal() throws org.apache.catalina.LifecycleException- Overrides:
stopInternal
in classorg.apache.catalina.session.ManagerBase
- Throws:
org.apache.catalina.LifecycleException
-
shutdownRedisson
protected void shutdownRedisson() -
store
- Throws:
IOException
-