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, setSessionMaxAliveTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addLifecycleListener, findLifecycleListeners, removeLifecycleListener, start, stop
getMaxInactiveInterval
protected AtomicBoolean started
Manager
been started?protected String name
Manager
protected String regionName
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
@Deprecated public void setPreferDeserializedForm(boolean enable)
enable
- boolean specifying whether to prefer deserialized form@Deprecated 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 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)
findSession
in interface org.apache.catalina.Manager
findSession
in class org.apache.catalina.session.ManagerBase
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 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 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 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 PropertyChangeListener
event
- The property change event that has occurredpublic org.apache.catalina.Context getTheContext()