VMware GemFire Java API Reference
Class DeltaSessionManager<CommitSessionValveT extends AbstractCommitSessionValve<?>>
- java.lang.Object
-
- org.apache.catalina.session.ManagerBase
-
- org.apache.geode.modules.session.catalina.DeltaSessionManager<CommitSessionValveT>
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.util.EventListener,javax.management.MBeanRegistration,org.apache.catalina.Lifecycle,org.apache.catalina.Manager,SessionManager
- Direct Known Subclasses:
Tomcat6DeltaSessionManager,Tomcat7DeltaSessionManager,Tomcat8DeltaSessionManager,Tomcat9DeltaSessionManager
public abstract class DeltaSessionManager<CommitSessionValveT extends AbstractCommitSessionValve<?>> extends org.apache.catalina.session.ManagerBase implements org.apache.catalina.Lifecycle, java.beans.PropertyChangeListener, SessionManager
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringnameThe name of thisManagerprotected java.lang.StringregionNameprotected java.util.concurrent.atomic.AtomicBooleanstartedHas thisManagerbeen started?-
Fields inherited from class org.apache.catalina.session.ManagerBase
algorithm, container, DEFAULT_ALGORITHM, devRandomSource, digest, distributable, domain, duplicates, entropy, expiredSessions, initialized, log, maxActive, maxInactiveInterval, mserver, oname, processExpiresFrequency, processingTime, random, randomClass, randomIS, sessionAverageAliveTime, sessionCounter, sessionCreationTiming, sessionExpirationTiming, sessionIdLength, sessionMaxAliveTime, sessions, sm, support, TIMING_STATS_CACHE_SIZE
-
-
Constructor Summary
Constructors Constructor Description DeltaSessionManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(org.apache.catalina.Session session)protected voidcancelTimer()protected abstract CommitSessionValveTcreateCommitSessionValve()org.apache.catalina.SessionfindSession(java.lang.String id)intgetActiveSessions()Returns the number of active sessionsbooleangetEnableDebugListener()booleangetEnableGatewayDeltaReplication()booleangetEnableGatewayReplication()booleangetEnableLocalCache()org.apache.juli.logging.LoggetLogger()intgetMaxActiveSessions()protected org.apache.catalina.session.StandardSessiongetNewSession()booleangetPreferDeserializedForm()Deprecated.No replacement.java.lang.StringgetRegionAttributesId()java.lang.StringgetRegionName()intgetRejectedSessions()SessionCachegetSessionCache()protected java.util.Set<java.lang.String>getSessionsToTouch()org.apache.geode.modules.session.catalina.internal.DeltaSessionStatisticsgetStatistics()java.lang.StringgetStatisticsName()org.apache.catalina.ContextgetTheContext()protected voidinitializeSessionCache()booleanisBackingCacheAvailable()booleanisClientServer()booleanisCommitValveEnabled()booleanisCommitValveFailfastEnabled()java.lang.StringlistSessionIds()For debugging: return a list of all session ids currently activevoidload()voidpropertyChange(java.beans.PropertyChangeEvent event)Process property change events from our associated Context.protected voidregisterCommitSessionValve()protected voidregisterJvmRouteBinderValve()voidremove(org.apache.catalina.Session session)protected voidscheduleTimerTasks()voidsetContainer(org.apache.catalina.Container container)This method was taken from StandardManager to set the default maxInactiveInterval based on the container (to 30 minutes).voidsetEnableCommitValve(boolean enable)voidsetEnableCommitValveFailfast(boolean enable)voidsetEnableDebugListener(boolean enableDebugListener)voidsetEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication)voidsetEnableGatewayReplication(boolean enableGatewayReplication)voidsetEnableLocalCache(boolean enableLocalCache)voidsetMaxActiveSessions(int maxActiveSessions)voidsetMaxInactiveInterval(int interval)voidsetPreferDeserializedForm(boolean enable)Deprecated.No replacement.voidsetRegionAttributesId(java.lang.String regionType)voidsetRegionName(java.lang.String regionName)voidsetRejectedSessions(int rejectedSessions)java.lang.StringtoString()voidunload()protected voidunregisterCommitSessionValve()protected voidunregisterJvmRouteBinderValve()-
Methods inherited from class org.apache.catalina.session.ManagerBase
addPropertyChangeListener, backgroundProcess, changeSessionId, createEmptySession, createSession, createSession, destroy, expireSession, findSessions, generateSessionId, getAlgorithm, getClassName, getContainer, getCreationTime, getCreationTimestamp, getDigest, getDistributable, getDomain, getDuplicates, getEngine, getEntropy, getExpiredSessions, getInfo, getJvmRoute, getLastAccessedTime, getLastAccessedTimestamp, getMaxActive, getMaxInactiveInterval, getName, getObjectName, getProcessExpiresFrequency, getProcessingTime, getRandom, getRandomBytes, getRandomClass, getRandomFile, getSession, getSessionAttribute, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdLength, getSessionMaxAliveTime, init, postDeregister, postRegister, preDeregister, preRegister, processExpires, removePropertyChangeListener, setAlgorithm, setDistributable, setDuplicates, setEntropy, setExpiredSessions, setMaxActive, setProcessExpiresFrequency, setProcessingTime, setRandomClass, setRandomFile, setSessionAverageAliveTime, setSessionCounter, setSessionIdLength, setSessionMaxAliveTime
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.catalina.Lifecycle
addLifecycleListener, findLifecycleListeners, removeLifecycleListener, start, stop
-
Methods inherited from interface org.apache.geode.modules.session.catalina.SessionManager
getMaxInactiveInterval
-
-
-
-
Method Detail
-
getRegionName
public java.lang.String getRegionName()
- Specified by:
getRegionNamein interfaceSessionManager
-
setRegionName
public void setRegionName(java.lang.String regionName)
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int interval)
- Specified by:
setMaxInactiveIntervalin interfaceorg.apache.catalina.Manager- Overrides:
setMaxInactiveIntervalin classorg.apache.catalina.session.ManagerBase
-
getRegionAttributesId
public java.lang.String getRegionAttributesId()
- Specified by:
getRegionAttributesIdin interfaceSessionManager
-
setRegionAttributesId
public void setRegionAttributesId(java.lang.String regionType)
-
getEnableLocalCache
public boolean getEnableLocalCache()
- Specified by:
getEnableLocalCachein interfaceSessionManager
-
setEnableLocalCache
public void setEnableLocalCache(boolean enableLocalCache)
-
getMaxActiveSessions
public int getMaxActiveSessions()
-
setMaxActiveSessions
public void setMaxActiveSessions(int maxActiveSessions)
-
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 public void setPreferDeserializedForm(boolean enable)
Deprecated.No replacement. Always prefer deserialized form.
-
getPreferDeserializedForm
@Deprecated public boolean getPreferDeserializedForm()
Deprecated.No replacement. Always prefer deserialized form.- Specified by:
getPreferDeserializedFormin interfaceSessionManager- Returns:
- whether to prefer deserialized form
-
getStatisticsName
public java.lang.String getStatisticsName()
- Specified by:
getStatisticsNamein interfaceSessionManager
-
getLogger
public org.apache.juli.logging.Log getLogger()
- Specified by:
getLoggerin interfaceSessionManager
-
getSessionCache
public SessionCache getSessionCache()
-
getStatistics
public org.apache.geode.modules.session.catalina.internal.DeltaSessionStatistics getStatistics()
-
isClientServer
public boolean isClientServer()
-
setContainer
public void setContainer(org.apache.catalina.Container container)
This method was taken from StandardManager to set the default maxInactiveInterval based on the container (to 30 minutes).Set the Container with which this Manager has been associated. If it is a Context (the usual case), listen for changes to the session timeout property.
- Specified by:
setContainerin interfaceorg.apache.catalina.Manager- Overrides:
setContainerin classorg.apache.catalina.session.ManagerBase- Parameters:
container- The associated Container
-
findSession
public org.apache.catalina.Session findSession(java.lang.String id)
- 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
-
setRejectedSessions
public void setRejectedSessions(int rejectedSessions)
- Specified by:
setRejectedSessionsin interfaceorg.apache.catalina.Manager
-
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
public java.lang.String listSessionIds()
For debugging: return a list of all session ids currently active- Overrides:
listSessionIdsin classorg.apache.catalina.session.ManagerBase
-
getSessionsToTouch
protected java.util.Set<java.lang.String> getSessionsToTouch()
-
scheduleTimerTasks
protected void scheduleTimerTasks()
-
cancelTimer
protected void cancelTimer()
-
load
public void load() throws java.lang.ClassNotFoundException, java.io.IOException- Specified by:
loadin interfaceorg.apache.catalina.Manager- Throws:
java.lang.ClassNotFoundExceptionjava.io.IOException
-
unload
public void unload() throws java.io.IOException- Specified by:
unloadin interfaceorg.apache.catalina.Manager- Throws:
java.io.IOException
-
registerJvmRouteBinderValve
protected void registerJvmRouteBinderValve()
-
unregisterJvmRouteBinderValve
protected void unregisterJvmRouteBinderValve()
-
registerCommitSessionValve
protected void registerCommitSessionValve()
-
createCommitSessionValve
protected abstract CommitSessionValveT createCommitSessionValve()
-
unregisterCommitSessionValve
protected void unregisterCommitSessionValve()
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
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 interfacejava.beans.PropertyChangeListener- Parameters:
event- The property change event that has occurred
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getTheContext
public org.apache.catalina.Context getTheContext()
-
-