public abstract class DeltaSessionManager extends org.apache.catalina.session.ManagerBase implements org.apache.catalina.Lifecycle, java.beans.PropertyChangeListener, SessionManager
Modifier and Type | Field and Description |
---|---|
protected org.apache.catalina.Valve |
commitSessionValve |
protected static boolean |
DEFAULT_ENABLE_COMMIT_VALVE |
protected static boolean |
DEFAULT_ENABLE_COMMIT_VALVE_FAILFAST |
protected static boolean |
DEFAULT_ENABLE_DEBUG_LISTENER |
protected static boolean |
DEFAULT_ENABLE_GATEWAY_DELTA_REPLICATION |
protected static boolean |
DEFAULT_ENABLE_GATEWAY_REPLICATION |
protected static boolean |
DEFAULT_PREFER_DESERIALIZED_FORM |
protected static java.lang.String |
DEFAULT_REGION_NAME |
protected boolean |
enableCommitValve |
protected boolean |
enableCommitValveFailfast |
protected boolean |
enableDebugListener |
protected boolean |
enableGatewayDeltaReplication |
protected boolean |
enableGatewayReplication |
protected java.lang.Boolean |
enableLocalCache |
protected org.apache.catalina.Valve |
jvmRouteBinderValve |
protected org.apache.juli.logging.Log |
LOGGER |
protected int |
maxActiveSessions
The maximum number of active Sessions allowed, or -1 for no limit.
|
protected java.lang.String |
name
The name of this
Manager |
protected boolean |
preferDeserializedForm |
protected java.lang.String |
regionAttributesId |
protected java.lang.String |
regionName |
protected SessionCache |
sessionCache |
protected java.util.concurrent.atomic.AtomicBoolean |
started
Has this
Manager been started? |
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 and Description |
---|
DeltaSessionManager() |
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.catalina.Session session) |
protected void |
addSessionToTouch(java.lang.String sessionId) |
protected void |
cancelTimer() |
protected void |
doLoad()
Load any currently active sessions that were previously unloaded to the appropriate persistence
mechanism, if any.
|
protected void |
doUnload()
Save any currently active sessions in the appropriate persistence mechanism, if any.
|
org.apache.catalina.Session |
findSession(java.lang.String id) |
int |
getActiveSessions()
Returns the number of active sessions
|
protected java.lang.String |
getContextName() |
boolean |
getEnableDebugListener() |
boolean |
getEnableGatewayDeltaReplication() |
boolean |
getEnableGatewayReplication() |
boolean |
getEnableLocalCache() |
org.apache.juli.logging.Log |
getLogger() |
int |
getMaxActiveSessions() |
protected org.apache.catalina.session.StandardSession |
getNewSession() |
protected org.apache.catalina.Pipeline |
getPipeline() |
boolean |
getPreferDeserializedForm() |
java.lang.String |
getRegionAttributesId() |
java.lang.String |
getRegionName() |
int |
getRejectedSessions() |
SessionCache |
getSessionCache() |
protected java.util.Set<java.lang.String> |
getSessionsToTouch() |
org.apache.geode.modules.session.catalina.internal.DeltaSessionStatistics |
getStatistics() |
java.lang.String |
getStatisticsName() |
org.apache.catalina.Context |
getTheContext() |
protected void |
initializeSessionCache() |
boolean |
isBackingCacheAvailable() |
boolean |
isClientServer() |
boolean |
isCommitValveEnabled() |
boolean |
isCommitValveFailfastEnabled() |
boolean |
isPeerToPeer() |
java.lang.String |
listSessionIds()
For debugging: return a list of all session ids currently active
|
void |
load() |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Process property change events from our associated Context.
|
protected void |
registerCommitSessionValve() |
protected void |
registerJvmRouteBinderValve() |
void |
remove(org.apache.catalina.Session session) |
void |
remove(org.apache.catalina.Session session,
boolean update) |
protected boolean |
removeTouchedSession(java.lang.String sessionId) |
protected void |
scheduleTimerTasks() |
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).
|
void |
setEnableCommitValve(boolean enable) |
void |
setEnableCommitValveFailfast(boolean enable) |
void |
setEnableDebugListener(boolean enableDebugListener) |
void |
setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication) |
void |
setEnableGatewayReplication(boolean enableGatewayReplication) |
void |
setEnableLocalCache(boolean enableLocalCache) |
void |
setMaxActiveSessions(int maxActiveSessions) |
void |
setMaxInactiveInterval(int interval) |
void |
setPreferDeserializedForm(boolean enable) |
void |
setRegionAttributesId(java.lang.String regionType) |
void |
setRegionName(java.lang.String regionName) |
void |
setRejectedSessions(int rejectedSessions) |
java.lang.String |
toString() |
void |
unload() |
protected void |
unregisterCommitSessionValve() |
protected void |
unregisterJvmRouteBinderValve() |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addLifecycleListener, findLifecycleListeners, removeLifecycleListener, start, stop
getMaxInactiveInterval
protected int maxActiveSessions
protected java.util.concurrent.atomic.AtomicBoolean started
Manager
been started?protected java.lang.String name
Manager
protected org.apache.catalina.Valve jvmRouteBinderValve
protected org.apache.catalina.Valve commitSessionValve
protected SessionCache sessionCache
protected static final java.lang.String DEFAULT_REGION_NAME
protected static final boolean DEFAULT_ENABLE_GATEWAY_DELTA_REPLICATION
protected static final boolean DEFAULT_ENABLE_GATEWAY_REPLICATION
protected static final boolean DEFAULT_ENABLE_DEBUG_LISTENER
protected static final boolean DEFAULT_ENABLE_COMMIT_VALVE
protected static final boolean DEFAULT_ENABLE_COMMIT_VALVE_FAILFAST
protected static final boolean DEFAULT_PREFER_DESERIALIZED_FORM
protected org.apache.juli.logging.Log LOGGER
protected java.lang.String regionName
protected java.lang.String regionAttributesId
protected java.lang.Boolean enableLocalCache
protected boolean enableCommitValve
protected boolean enableCommitValveFailfast
protected boolean enableGatewayDeltaReplication
protected boolean enableGatewayReplication
protected boolean enableDebugListener
protected boolean preferDeserializedForm
public java.lang.String getRegionName()
getRegionName
in interface SessionManager
public void setRegionName(java.lang.String regionName)
public void setMaxInactiveInterval(int interval)
setMaxInactiveInterval
in interface org.apache.catalina.Manager
setMaxInactiveInterval
in class org.apache.catalina.session.ManagerBase
public java.lang.String getRegionAttributesId()
getRegionAttributesId
in interface SessionManager
public void setRegionAttributesId(java.lang.String regionType)
public boolean getEnableLocalCache()
getEnableLocalCache
in interface SessionManager
public void setEnableLocalCache(boolean enableLocalCache)
public int getMaxActiveSessions()
public void setMaxActiveSessions(int maxActiveSessions)
public boolean getEnableGatewayDeltaReplication()
getEnableGatewayDeltaReplication
in interface SessionManager
public void setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication)
public boolean getEnableGatewayReplication()
getEnableGatewayReplication
in interface SessionManager
public void setEnableGatewayReplication(boolean enableGatewayReplication)
public boolean getEnableDebugListener()
getEnableDebugListener
in interface SessionManager
public void setEnableDebugListener(boolean enableDebugListener)
public boolean isCommitValveEnabled()
isCommitValveEnabled
in interface SessionManager
public void setEnableCommitValve(boolean enable)
public boolean isCommitValveFailfastEnabled()
isCommitValveFailfastEnabled
in interface SessionManager
public void setEnableCommitValveFailfast(boolean enable)
public boolean isBackingCacheAvailable()
isBackingCacheAvailable
in interface SessionManager
public void setPreferDeserializedForm(boolean enable)
public boolean getPreferDeserializedForm()
getPreferDeserializedForm
in interface SessionManager
public java.lang.String getStatisticsName()
getStatisticsName
in interface SessionManager
public org.apache.juli.logging.Log getLogger()
getLogger
in interface SessionManager
public SessionCache getSessionCache()
public org.apache.geode.modules.session.catalina.internal.DeltaSessionStatistics getStatistics()
public boolean isPeerToPeer()
public boolean isClientServer()
public void setContainer(org.apache.catalina.Container container)
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.
setContainer
in interface org.apache.catalina.Manager
setContainer
in class org.apache.catalina.session.ManagerBase
container
- The associated Containerpublic org.apache.catalina.Session findSession(java.lang.String id) throws java.io.IOException
findSession
in interface org.apache.catalina.Manager
findSession
in class org.apache.catalina.session.ManagerBase
java.io.IOException
protected void initializeSessionCache()
protected org.apache.catalina.session.StandardSession getNewSession()
getNewSession
in class org.apache.catalina.session.ManagerBase
public void remove(org.apache.catalina.Session session)
remove
in interface org.apache.catalina.Manager
remove
in class org.apache.catalina.session.ManagerBase
public void remove(org.apache.catalina.Session session, boolean update)
public void add(org.apache.catalina.Session session)
add
in interface org.apache.catalina.Manager
add
in class org.apache.catalina.session.ManagerBase
public int getRejectedSessions()
getRejectedSessions
in interface org.apache.catalina.Manager
public void setRejectedSessions(int rejectedSessions)
setRejectedSessions
in interface org.apache.catalina.Manager
public int getActiveSessions()
getActiveSessions
in interface org.apache.catalina.Manager
getActiveSessions
in class org.apache.catalina.session.ManagerBase
public java.lang.String listSessionIds()
listSessionIds
in class org.apache.catalina.session.ManagerBase
protected void addSessionToTouch(java.lang.String sessionId)
protected java.util.Set<java.lang.String> getSessionsToTouch()
protected boolean removeTouchedSession(java.lang.String sessionId)
protected void scheduleTimerTasks()
protected void cancelTimer()
public void load() throws java.lang.ClassNotFoundException, java.io.IOException
load
in interface org.apache.catalina.Manager
java.lang.ClassNotFoundException
java.io.IOException
public void unload() throws java.io.IOException
unload
in interface org.apache.catalina.Manager
java.io.IOException
protected void registerJvmRouteBinderValve()
protected org.apache.catalina.Pipeline getPipeline()
protected void unregisterJvmRouteBinderValve()
protected void registerCommitSessionValve()
protected void unregisterCommitSessionValve()
public void propertyChange(java.beans.PropertyChangeEvent event)
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:
propertyChange
in interface java.beans.PropertyChangeListener
event
- The property change event that has occurredprotected void doUnload() throws java.io.IOException
java.io.IOException
- if an input/output error occursprotected void doLoad() throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
- if a serialized class cannot be found during the reloadjava.io.IOException
- if an input/output error occurspublic java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String getContextName()
public org.apache.catalina.Context getTheContext()