Class DeltaSessionManager<CommitSessionValveT extends AbstractCommitSessionValve<?>>
java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.session.ManagerBase
org.apache.geode.modules.session.catalina.DeltaSessionManager<CommitSessionValveT>
- All Implemented Interfaces:
PropertyChangeListener,EventListener,MBeanRegistration,org.apache.catalina.JmxEnabled,org.apache.catalina.Lifecycle,org.apache.catalina.Manager,SessionManager
- Direct Known Subclasses:
Tomcat10DeltaSessionManager
public abstract class DeltaSessionManager<CommitSessionValveT extends AbstractCommitSessionValve<?>>
extends org.apache.catalina.session.ManagerBase
implements org.apache.catalina.Lifecycle, PropertyChangeListener, SessionManager
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.catalina.session.ManagerBase
org.apache.catalina.session.ManagerBase.SessionTimingNested classes/interfaces inherited from interface org.apache.catalina.Lifecycle
org.apache.catalina.Lifecycle.SingleUse -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe name of thisManagerprotected Stringprotected AtomicBooleanHas thisManagerbeen started?Fields inherited from class org.apache.catalina.session.ManagerBase
duplicates, expiredSessions, maxActive, processExpiresFrequency, processingTime, secureRandomAlgorithm, secureRandomClass, secureRandomProvider, sessionCounter, sessionCreationTiming, sessionExpirationTiming, sessionIdGenerator, sessionIdGeneratorClass, sessionMaxAliveTime, sessions, sm, support, TIMING_STATS_CACHE_SIZEFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(org.apache.catalina.Session session) protected voidprotected abstract CommitSessionValveTorg.apache.catalina.SessionfindSession(String id) intReturns the number of active sessionsbooleanbooleanbooleanbooleanorg.apache.juli.logging.Logintabstract intprotected org.apache.catalina.session.StandardSessionprotected abstract org.apache.catalina.PipelinebooleanDeprecated.No replacement.intorg.apache.geode.modules.session.catalina.internal.DeltaSessionStatisticsabstract org.apache.catalina.Contextprotected voidbooleanbooleanbooleanbooleanFor debugging: return a list of all session ids currently activevoidload()voidProcess property change events from our associated Context.protected voidprotected voidvoidremove(org.apache.catalina.Session session) protected voidvoidsetEnableCommitValve(boolean enable) voidsetEnableCommitValveFailfast(boolean enable) voidsetEnableDebugListener(boolean enableDebugListener) voidsetEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication) voidsetEnableGatewayReplication(boolean enableGatewayReplication) voidsetEnableLocalCache(boolean enableLocalCache) voidsetMaxActiveSessions(int maxActiveSessions) abstract voidsetMaxInactiveInterval(int interval) voidsetPreferDeserializedForm(boolean enable) Deprecated.No replacement.voidsetRegionAttributesId(String regionType) voidsetRegionName(String regionName) voidsetRejectedSessions(int rejectedSessions) toString()voidunload()protected voidprotected voidMethods inherited from class org.apache.catalina.session.ManagerBase
addPropertyChangeListener, backgroundProcess, changeSessionId, changeSessionId, createEmptySession, createSession, expireSession, findSessions, generateSessionId, getClassName, getContext, getCreationTime, getCreationTimestamp, getDomainInternal, getDuplicates, getEngine, getExpiredSessions, getJvmRoute, getLastAccessedTime, getLastAccessedTimestamp, getMaxActive, getName, getNotifyAttributeListenerOnUnchangedValue, getNotifyBindingListenerOnUnchangedValue, getObjectNameKeyProperties, getPersistAuthentication, getProcessExpiresFrequency, getProcessingTime, getSecureRandomAlgorithm, getSecureRandomClass, getSecureRandomProvider, getSession, getSessionActivityCheck, getSessionAttribute, getSessionAttributeNameFilter, getSessionAttributeNamePattern, getSessionAttributeValueClassNameFilter, getSessionAttributeValueClassNamePattern, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdGenerator, getSessionLastAccessAtStart, getSessionMaxAliveTime, getThisAccessedTime, getThisAccessedTimestamp, getWarnOnSessionAttributeFilterFailure, initInternal, processExpires, remove, removePropertyChangeListener, rotateSessionId, setContext, setDuplicates, setExpiredSessions, setMaxActive, setNotifyAttributeListenerOnUnchangedValue, setNotifyBindingListenerOnUnchangedValue, setPersistAuthentication, setProcessExpiresFrequency, setProcessingTime, setSecureRandomAlgorithm, setSecureRandomClass, setSecureRandomProvider, setSessionActivityCheck, setSessionAttributeNameFilter, setSessionAttributeValueClassNameFilter, setSessionCounter, setSessionIdGenerator, setSessionLastAccessAtStart, setSessionMaxAliveTime, setWarnOnSessionAttributeFilterFailure, startInternal, stopInternal, updateSessionMaxAliveTime, willAttributeDistributeMethods inherited from class org.apache.catalina.util.LifecycleMBeanBase
destroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregisterMethods inherited from class org.apache.catalina.util.LifecycleBase
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.catalina.Lifecycle
addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
-
Field Details
-
started
Has thisManagerbeen started? -
name
The name of thisManager -
regionName
-
-
Constructor Details
-
DeltaSessionManager
public DeltaSessionManager()
-
-
Method Details
-
getRegionName
- Specified by:
getRegionNamein interfaceSessionManager
-
setRegionName
-
getRegionAttributesId
- Specified by:
getRegionAttributesIdin interfaceSessionManager
-
setRegionAttributesId
-
getEnableLocalCache
public boolean getEnableLocalCache()- Specified by:
getEnableLocalCachein interfaceSessionManager
-
setEnableLocalCache
public void setEnableLocalCache(boolean enableLocalCache) -
getMaxActiveSessions
public int getMaxActiveSessions()- Overrides:
getMaxActiveSessionsin classorg.apache.catalina.session.ManagerBase
-
setMaxActiveSessions
public void setMaxActiveSessions(int maxActiveSessions) - Overrides:
setMaxActiveSessionsin classorg.apache.catalina.session.ManagerBase
-
getEnableGatewayDeltaReplication
public boolean getEnableGatewayDeltaReplication()- Specified by:
getEnableGatewayDeltaReplicationin interfaceSessionManager
-
setEnableGatewayDeltaReplication
public void setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication) -
getEnableGatewayReplication
public boolean getEnableGatewayReplication()- Specified by:
getEnableGatewayReplicationin interfaceSessionManager
-
setEnableGatewayReplication
public void setEnableGatewayReplication(boolean enableGatewayReplication) -
getEnableDebugListener
public boolean getEnableDebugListener()- Specified by:
getEnableDebugListenerin interfaceSessionManager
-
setEnableDebugListener
public void setEnableDebugListener(boolean enableDebugListener) -
isCommitValveEnabled
public boolean isCommitValveEnabled()- Specified by:
isCommitValveEnabledin interfaceSessionManager
-
setEnableCommitValve
public void setEnableCommitValve(boolean enable) -
isCommitValveFailfastEnabled
public boolean isCommitValveFailfastEnabled()- Specified by:
isCommitValveFailfastEnabledin interfaceSessionManager
-
setEnableCommitValveFailfast
public void setEnableCommitValveFailfast(boolean enable) -
isBackingCacheAvailable
public boolean isBackingCacheAvailable()- Specified by:
isBackingCacheAvailablein interfaceSessionManager
-
setPreferDeserializedForm
Deprecated.No replacement. Always prefer deserialized form. -
getPreferDeserializedForm
Deprecated.No replacement. Always prefer deserialized form.- Specified by:
getPreferDeserializedFormin interfaceSessionManager- Returns:
- whether to prefer deserialized form
-
getStatisticsName
- Specified by:
getStatisticsNamein interfaceSessionManager
-
getLogger
public org.apache.juli.logging.Log getLogger()- Specified by:
getLoggerin interfaceSessionManager
-
getSessionCache
-
getStatistics
public org.apache.geode.modules.session.catalina.internal.DeltaSessionStatistics getStatistics() -
isClientServer
public boolean isClientServer() -
findSession
- Specified by:
findSessionin interfaceorg.apache.catalina.Manager- Overrides:
findSessionin classorg.apache.catalina.session.ManagerBase
-
initializeSessionCache
protected void initializeSessionCache() -
getNewSession
protected org.apache.catalina.session.StandardSession getNewSession()- Overrides:
getNewSessionin classorg.apache.catalina.session.ManagerBase
-
remove
public void remove(org.apache.catalina.Session session) - Specified by:
removein interfaceorg.apache.catalina.Manager- Overrides:
removein classorg.apache.catalina.session.ManagerBase
-
add
public void add(org.apache.catalina.Session session) - Specified by:
addin interfaceorg.apache.catalina.Manager- Overrides:
addin classorg.apache.catalina.session.ManagerBase
-
getRejectedSessions
public int getRejectedSessions()- Specified by:
getRejectedSessionsin interfaceorg.apache.catalina.Manager- Overrides:
getRejectedSessionsin classorg.apache.catalina.session.ManagerBase
-
setRejectedSessions
public void setRejectedSessions(int rejectedSessions) -
getActiveSessions
public int getActiveSessions()Returns the number of active sessions- Specified by:
getActiveSessionsin interfaceorg.apache.catalina.Manager- Overrides:
getActiveSessionsin classorg.apache.catalina.session.ManagerBase- Returns:
- number of sessions active
-
listSessionIds
For debugging: return a list of all session ids currently active- Overrides:
listSessionIdsin classorg.apache.catalina.session.ManagerBase
-
getSessionsToTouch
-
scheduleTimerTasks
protected void scheduleTimerTasks() -
cancelTimer
protected void cancelTimer() -
load
- Specified by:
loadin interfaceorg.apache.catalina.Manager- Throws:
ClassNotFoundExceptionIOException
-
unload
- Specified by:
unloadin interfaceorg.apache.catalina.Manager- Throws:
IOException
-
registerJvmRouteBinderValve
protected void registerJvmRouteBinderValve() -
getPipeline
protected abstract org.apache.catalina.Pipeline getPipeline() -
unregisterJvmRouteBinderValve
protected void unregisterJvmRouteBinderValve() -
registerCommitSessionValve
protected void registerCommitSessionValve() -
createCommitSessionValve
-
unregisterCommitSessionValve
protected void unregisterCommitSessionValve() -
propertyChange
Process property change events from our associated Context.Part of this method implementation was taken from StandardManager. The sessionTimeout can be changed in the web.xml which is processed after the context.xml. The context (and the default session timeout) would already have been set in this Manager. This is the way to get the new session timeout value specified in the web.xml.
The precedence order for setting the session timeout value is:
- the max inactive interval is set based on the Manager defined in the context.xml
- the max inactive interval is then overwritten by the value of the Context's session timeout when setContainer is called
- the max inactive interval is then overwritten by the value of the session-timeout specified in the web.xml (if any)
- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
event- The property change event that has occurred
-
toString
- Overrides:
toStringin classorg.apache.catalina.session.ManagerBase
-
getTheContext
public abstract org.apache.catalina.Context getTheContext() -
getMaxInactiveInterval
public abstract int getMaxInactiveInterval()- Specified by:
getMaxInactiveIntervalin interfaceSessionManager
-
setMaxInactiveInterval
public abstract void setMaxInactiveInterval(int interval)
-