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, setSessionMaxAliveTimeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLifecycleListener, findLifecycleListeners, removeLifecycleListener, start, stopgetMaxInactiveIntervalprotected int maxActiveSessions
protected java.util.concurrent.atomic.AtomicBoolean started
Manager been started?protected java.lang.String name
Managerprotected 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 SessionManagerpublic void setRegionName(java.lang.String regionName)
public void setMaxInactiveInterval(int interval)
setMaxInactiveInterval in interface org.apache.catalina.ManagersetMaxInactiveInterval in class org.apache.catalina.session.ManagerBasepublic java.lang.String getRegionAttributesId()
getRegionAttributesId in interface SessionManagerpublic void setRegionAttributesId(java.lang.String regionType)
public boolean getEnableLocalCache()
getEnableLocalCache in interface SessionManagerpublic void setEnableLocalCache(boolean enableLocalCache)
public int getMaxActiveSessions()
public void setMaxActiveSessions(int maxActiveSessions)
public boolean getEnableGatewayDeltaReplication()
getEnableGatewayDeltaReplication in interface SessionManagerpublic void setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication)
public boolean getEnableGatewayReplication()
getEnableGatewayReplication in interface SessionManagerpublic void setEnableGatewayReplication(boolean enableGatewayReplication)
public boolean getEnableDebugListener()
getEnableDebugListener in interface SessionManagerpublic void setEnableDebugListener(boolean enableDebugListener)
public boolean isCommitValveEnabled()
isCommitValveEnabled in interface SessionManagerpublic void setEnableCommitValve(boolean enable)
public boolean isCommitValveFailfastEnabled()
isCommitValveFailfastEnabled in interface SessionManagerpublic void setEnableCommitValveFailfast(boolean enable)
public boolean isBackingCacheAvailable()
isBackingCacheAvailable in interface SessionManagerpublic void setPreferDeserializedForm(boolean enable)
public boolean getPreferDeserializedForm()
getPreferDeserializedForm in interface SessionManagerpublic java.lang.String getStatisticsName()
getStatisticsName in interface SessionManagerpublic org.apache.juli.logging.Log getLogger()
getLogger in interface SessionManagerpublic 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.ManagersetContainer in class org.apache.catalina.session.ManagerBasecontainer - The associated Containerpublic org.apache.catalina.Session findSession(java.lang.String id)
throws java.io.IOException
findSession in interface org.apache.catalina.ManagerfindSession in class org.apache.catalina.session.ManagerBasejava.io.IOExceptionprotected void initializeSessionCache()
protected org.apache.catalina.session.StandardSession getNewSession()
getNewSession in class org.apache.catalina.session.ManagerBasepublic void remove(org.apache.catalina.Session session)
remove in interface org.apache.catalina.Managerremove in class org.apache.catalina.session.ManagerBasepublic void remove(org.apache.catalina.Session session,
boolean update)
public void add(org.apache.catalina.Session session)
add in interface org.apache.catalina.Manageradd in class org.apache.catalina.session.ManagerBasepublic int getRejectedSessions()
getRejectedSessions in interface org.apache.catalina.Managerpublic void setRejectedSessions(int rejectedSessions)
setRejectedSessions in interface org.apache.catalina.Managerpublic int getActiveSessions()
getActiveSessions in interface org.apache.catalina.ManagergetActiveSessions in class org.apache.catalina.session.ManagerBasepublic java.lang.String listSessionIds()
listSessionIds in class org.apache.catalina.session.ManagerBaseprotected 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.Managerjava.lang.ClassNotFoundExceptionjava.io.IOExceptionpublic void unload()
throws java.io.IOException
unload in interface org.apache.catalina.Managerjava.io.IOExceptionprotected 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.PropertyChangeListenerevent - 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.Objectprotected java.lang.String getContextName()
public org.apache.catalina.Context getTheContext()