public abstract class DeltaSessionManager extends org.apache.catalina.session.ManagerBase implements org.apache.catalina.Lifecycle, 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 String |
DEFAULT_REGION_NAME |
protected boolean |
enableCommitValve |
protected boolean |
enableCommitValveFailfast |
protected boolean |
enableDebugListener |
protected boolean |
enableGatewayDeltaReplication |
protected boolean |
enableGatewayReplication |
protected 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 String |
name
The name of this
Manager |
protected boolean |
preferDeserializedForm |
protected String |
regionAttributesId |
protected String |
regionName |
protected SessionCache |
sessionCache |
protected 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(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(String id) |
int |
getActiveSessions()
Returns the number of active sessions
|
protected 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() |
String |
getRegionAttributesId() |
String |
getRegionName() |
int |
getRejectedSessions() |
SessionCache |
getSessionCache() |
protected Set<String> |
getSessionsToTouch() |
org.apache.geode.modules.session.catalina.internal.DeltaSessionStatistics |
getStatistics() |
String |
getStatisticsName() |
org.apache.catalina.Context |
getTheContext() |
protected void |
initializeSessionCache() |
boolean |
isBackingCacheAvailable() |
boolean |
isClientServer() |
boolean |
isCommitValveEnabled() |
boolean |
isCommitValveFailfastEnabled() |
boolean |
isPeerToPeer() |
String |
listSessionIds()
For debugging: return a list of all session ids currently active
|
void |
load() |
void |
propertyChange(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(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(String regionType) |
void |
setRegionName(String regionName) |
void |
setRejectedSessions(int rejectedSessions) |
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 AtomicBoolean started
Manager
been started?protected String name
Manager
protected org.apache.catalina.Valve jvmRouteBinderValve
protected org.apache.catalina.Valve commitSessionValve
protected SessionCache sessionCache
protected static final 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 String regionName
protected String regionAttributesId
protected Boolean enableLocalCache
protected boolean enableCommitValve
protected boolean enableCommitValveFailfast
protected boolean enableGatewayDeltaReplication
protected boolean enableGatewayReplication
protected boolean enableDebugListener
protected boolean preferDeserializedForm
public String getRegionName()
getRegionName
in interface SessionManager
public void setRegionName(String regionName)
public void setMaxInactiveInterval(int interval)
setMaxInactiveInterval
in interface org.apache.catalina.Manager
setMaxInactiveInterval
in class org.apache.catalina.session.ManagerBase
public String getRegionAttributesId()
getRegionAttributesId
in interface SessionManager
public void setRegionAttributesId(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 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(String id) throws IOException
findSession
in interface org.apache.catalina.Manager
findSession
in class org.apache.catalina.session.ManagerBase
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 String listSessionIds()
listSessionIds
in class org.apache.catalina.session.ManagerBase
protected void addSessionToTouch(String sessionId)
protected boolean removeTouchedSession(String sessionId)
protected void scheduleTimerTasks()
protected void cancelTimer()
public void load() throws ClassNotFoundException, IOException
load
in interface org.apache.catalina.Manager
ClassNotFoundException
IOException
public void unload() throws IOException
unload
in interface org.apache.catalina.Manager
IOException
protected void registerJvmRouteBinderValve()
protected org.apache.catalina.Pipeline getPipeline()
protected void unregisterJvmRouteBinderValve()
protected void registerCommitSessionValve()
protected void unregisterCommitSessionValve()
public void propertyChange(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 PropertyChangeListener
event
- The property change event that has occurredprotected void doUnload() throws IOException
IOException
- if an input/output error occursprotected void doLoad() throws ClassNotFoundException, IOException
ClassNotFoundException
- if a serialized class cannot be found during the reloadIOException
- if an input/output error occursprotected String getContextName()
public org.apache.catalina.Context getTheContext()