public abstract class DeltaSessionManager<CommitSessionValveT extends AbstractCommitSessionValve<?>> extends org.apache.catalina.session.ManagerBase implements org.apache.catalina.Lifecycle, PropertyChangeListener, SessionManager
| Modifier and Type | Field and Description |
|---|---|
protected String |
name
The name of this
Manager |
protected String |
regionName |
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 |
cancelTimer() |
protected abstract CommitSessionValveT |
createCommitSessionValve() |
org.apache.catalina.Session |
findSession(String id) |
int |
getActiveSessions()
Returns the number of active sessions
|
boolean |
getEnableDebugListener() |
boolean |
getEnableGatewayDeltaReplication() |
boolean |
getEnableGatewayReplication() |
boolean |
getEnableLocalCache() |
org.apache.juli.logging.Log |
getLogger() |
int |
getMaxActiveSessions() |
protected org.apache.catalina.session.StandardSession |
getNewSession() |
boolean |
getPreferDeserializedForm()
Deprecated.
No replacement. Always prefer deserialized form.
|
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() |
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) |
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)
Deprecated.
No replacement. Always prefer deserialized form.
|
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, setSessionMaxAliveTimeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLifecycleListener, findLifecycleListeners, removeLifecycleListener, start, stopgetMaxInactiveIntervalprotected AtomicBoolean started
Manager been started?protected String name
Managerprotected String regionName
public String getRegionName()
getRegionName in interface SessionManagerpublic void setRegionName(String regionName)
public void setMaxInactiveInterval(int interval)
setMaxInactiveInterval in interface org.apache.catalina.ManagersetMaxInactiveInterval in class org.apache.catalina.session.ManagerBasepublic String getRegionAttributesId()
getRegionAttributesId in interface SessionManagerpublic void setRegionAttributesId(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 SessionManager@Deprecated public void setPreferDeserializedForm(boolean enable)
@Deprecated public boolean getPreferDeserializedForm()
getPreferDeserializedForm in interface SessionManagerpublic 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 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(String id)
findSession in interface org.apache.catalina.ManagerfindSession in class org.apache.catalina.session.ManagerBaseprotected 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 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 String listSessionIds()
listSessionIds in class org.apache.catalina.session.ManagerBaseprotected void scheduleTimerTasks()
protected void cancelTimer()
public void load()
throws ClassNotFoundException,
IOException
load in interface org.apache.catalina.ManagerClassNotFoundExceptionIOExceptionpublic void unload()
throws IOException
unload in interface org.apache.catalina.ManagerIOExceptionprotected void registerJvmRouteBinderValve()
protected void unregisterJvmRouteBinderValve()
protected void registerCommitSessionValve()
protected abstract CommitSessionValveT createCommitSessionValve()
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 PropertyChangeListenerevent - The property change event that has occurredpublic org.apache.catalina.Context getTheContext()