DeltaSessionManager (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.modules.session.catalina, class: DeltaSessionManager

Package org.apache.geode.modules.session.catalina

# Class DeltaSessionManager<CommitSessionValveT extends AbstractCommitSessionValve<?>>

java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.session.ManagerBase
org.apache.geode.modules.session.catalina.DeltaSessionManager<CommitSessionValveT>

All Implemented Interfaces:
  `PropertyChangeListener`, `EventListener`, `MBeanRegistration`, `org.apache.catalina.JmxEnabled`, `org.apache.catalina.Lifecycle`, `org.apache.catalina.Manager`, `SessionManager`

Direct Known Subclasses:
  `Tomcat10DeltaSessionManager`

public abstract class DeltaSessionManager<CommitSessionValveT extends AbstractCommitSessionValve<?>> extends org.apache.catalina.session.ManagerBase implements org.apache.catalina.Lifecycle, PropertyChangeListener, SessionManager

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.catalina.session.ManagerBase

  `org.apache.catalina.session.ManagerBase.SessionTiming`

  ## Nested classes/interfaces inherited from interface org.apache.catalina.Lifecycle

  `org.apache.catalina.Lifecycle.SingleUse`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected String`
  `name`
  The name of this `Manager`
  `protected String`
  `regionName`
  `protected AtomicBoolean`
  `started`
  Has this `Manager` been started?

  ### Fields inherited from class org.apache.catalina.session.ManagerBase

  `duplicates, expiredSessions, maxActive, processExpiresFrequency, processingTime, secureRandomAlgorithm, secureRandomClass, secureRandomProvider, sessionCounter, sessionCreationTiming, sessionExpirationTiming, sessionIdGenerator, sessionIdGeneratorClass, sessionMaxAliveTime, sessions, sm, support, TIMING_STATS_CACHE_SIZE`

  ### Fields inherited from interface org.apache.catalina.Lifecycle

  `AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DeltaSessionManager()`

- ## Method Summary

  Modifier and Type
  Method
  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()`
  `abstract int`
  `getMaxInactiveInterval()`
  `protected org.apache.catalina.session.StandardSession`
  `getNewSession()`
  `protected abstract org.apache.catalina.Pipeline`
  `getPipeline()`
  `boolean`
  `getPreferDeserializedForm()`
  Deprecated.
  No replacement.
  `String`
  `getRegionAttributesId()`
  `String`
  `getRegionName()`
  `int`
  `getRejectedSessions()`
  `SessionCache`
  `getSessionCache()`
  `protected Set<String>`
  `getSessionsToTouch()`
  `org.apache.geode.modules.session.catalina.internal.DeltaSessionStatistics`
  `getStatistics()`
  `String`
  `getStatisticsName()`
  `abstract 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`
  `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)`
  `abstract void`
  `setMaxInactiveInterval(int interval)`
  `void`
  `setPreferDeserializedForm(boolean enable)`
  Deprecated.
  No replacement.
  `void`
  `setRegionAttributesId(String regionType)`
  `void`
  `setRegionName(String regionName)`
  `void`
  `setRejectedSessions(int rejectedSessions)`
  `String`
  `toString()`
  `void`
  `unload()`
  `protected void`
  `unregisterCommitSessionValve()`
  `protected void`
  `unregisterJvmRouteBinderValve()`

  ### Methods inherited from class org.apache.catalina.session.ManagerBase

  `addPropertyChangeListener, backgroundProcess, changeSessionId, changeSessionId, createEmptySession, createSession, expireSession, findSessions, generateSessionId, getClassName, getContext, getCreationTime, getCreationTimestamp, getDomainInternal, getDuplicates, getEngine, getExpiredSessions, getJvmRoute, getLastAccessedTime, getLastAccessedTimestamp, getMaxActive, getName, getNotifyAttributeListenerOnUnchangedValue, getNotifyBindingListenerOnUnchangedValue, getObjectNameKeyProperties, getPersistAuthentication, getProcessExpiresFrequency, getProcessingTime, getSecureRandomAlgorithm, getSecureRandomClass, getSecureRandomProvider, getSession, getSessionActivityCheck, getSessionAttribute, getSessionAttributeNameFilter, getSessionAttributeNamePattern, getSessionAttributeValueClassNameFilter, getSessionAttributeValueClassNamePattern, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdGenerator, getSessionLastAccessAtStart, getSessionMaxAliveTime, getThisAccessedTime, getThisAccessedTimestamp, getWarnOnSessionAttributeFilterFailure, initInternal, processExpires, remove, removePropertyChangeListener, rotateSessionId, setContext, setDuplicates, setExpiredSessions, setMaxActive, setNotifyAttributeListenerOnUnchangedValue, setNotifyBindingListenerOnUnchangedValue, setPersistAuthentication, setProcessExpiresFrequency, setProcessingTime, setSecureRandomAlgorithm, setSecureRandomClass, setSecureRandomProvider, setSessionActivityCheck, setSessionAttributeNameFilter, setSessionAttributeValueClassNameFilter, setSessionCounter, setSessionIdGenerator, setSessionLastAccessAtStart, setSessionMaxAliveTime, setWarnOnSessionAttributeFilterFailure, startInternal, stopInternal, updateSessionMaxAliveTime, willAttributeDistribute`

  ### Methods inherited from class org.apache.catalina.util.LifecycleMBeanBase

  `destroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregister`

  ### Methods inherited from class org.apache.catalina.util.LifecycleBase

  `addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.apache.catalina.Lifecycle

  `addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop`

- ## Field Details

  - ### started

    protected AtomicBoolean started
    Has this `Manager` been started?

  - ### name

    protected String name
    The name of this `Manager`

  - ### regionName

    protected String regionName

- ## Constructor Details

  - ### DeltaSessionManager

    public DeltaSessionManager()

- ## Method Details

  - ### getRegionName

    public String getRegionName()
    Specified by:
      `getRegionName` in interface `SessionManager`

  - ### setRegionName

    public void setRegionName(String regionName)

  - ### getRegionAttributesId

    public String getRegionAttributesId()
    Specified by:
      `getRegionAttributesId` in interface `SessionManager`

  - ### setRegionAttributesId

    public void setRegionAttributesId(String regionType)

  - ### getEnableLocalCache

    public boolean getEnableLocalCache()
    Specified by:
      `getEnableLocalCache` in interface `SessionManager`

  - ### setEnableLocalCache

    public void setEnableLocalCache(boolean enableLocalCache)

  - ### getMaxActiveSessions

    public int getMaxActiveSessions()
    Overrides:
      `getMaxActiveSessions` in class `org.apache.catalina.session.ManagerBase`

  - ### setMaxActiveSessions

    public void setMaxActiveSessions(int maxActiveSessions)
    Overrides:
      `setMaxActiveSessions` in class `org.apache.catalina.session.ManagerBase`

  - ### getEnableGatewayDeltaReplication

    public boolean getEnableGatewayDeltaReplication()
    Specified by:
      `getEnableGatewayDeltaReplication` in interface `SessionManager`

  - ### setEnableGatewayDeltaReplication

    public void setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication)

  - ### getEnableGatewayReplication

    public boolean getEnableGatewayReplication()
    Specified by:
      `getEnableGatewayReplication` in interface `SessionManager`

  - ### setEnableGatewayReplication

    public void setEnableGatewayReplication(boolean enableGatewayReplication)

  - ### getEnableDebugListener

    public boolean getEnableDebugListener()
    Specified by:
      `getEnableDebugListener` in interface `SessionManager`

  - ### setEnableDebugListener

    public void setEnableDebugListener(boolean enableDebugListener)

  - ### isCommitValveEnabled

    public boolean isCommitValveEnabled()
    Specified by:
      `isCommitValveEnabled` in interface `SessionManager`

  - ### setEnableCommitValve

    public void setEnableCommitValve(boolean enable)

  - ### isCommitValveFailfastEnabled

    public boolean isCommitValveFailfastEnabled()
    Specified by:
      `isCommitValveFailfastEnabled` in interface `SessionManager`

  - ### setEnableCommitValveFailfast

    public void setEnableCommitValveFailfast(boolean enable)

  - ### isBackingCacheAvailable

    public boolean isBackingCacheAvailable()
    Specified by:
      `isBackingCacheAvailable` in interface `SessionManager`

  - ### setPreferDeserializedForm

    @Deprecated public void setPreferDeserializedForm(boolean enable)
    Deprecated.
    No replacement. Always prefer deserialized form.

  - ### getPreferDeserializedForm

    @Deprecated public boolean getPreferDeserializedForm()
    Deprecated.
    No replacement. Always prefer deserialized form.
    Specified by:
      `getPreferDeserializedForm` in interface `SessionManager`
    Returns:
      whether to prefer deserialized form

  - ### getStatisticsName

    public String getStatisticsName()
    Specified by:
      `getStatisticsName` in interface `SessionManager`

  - ### getLogger

    public org.apache.juli.logging.Log getLogger()
    Specified by:
      `getLogger` in interface `SessionManager`

  - ### getSessionCache

    public SessionCache getSessionCache()

  - ### getStatistics

    public org.apache.geode.modules.session.catalina.internal.DeltaSessionStatistics getStatistics()

  - ### isClientServer

    public boolean isClientServer()

  - ### findSession

    public org.apache.catalina.Session findSession(String id)
    Specified by:
      `findSession` in interface `org.apache.catalina.Manager`
    Overrides:
      `findSession` in class `org.apache.catalina.session.ManagerBase`

  - ### initializeSessionCache

    protected void initializeSessionCache()

  - ### getNewSession

    protected org.apache.catalina.session.StandardSession getNewSession()
    Overrides:
      `getNewSession` in class `org.apache.catalina.session.ManagerBase`

  - ### remove

    public void remove(org.apache.catalina.Session session)
    Specified by:
      `remove` in interface `org.apache.catalina.Manager`
    Overrides:
      `remove` in class `org.apache.catalina.session.ManagerBase`

  - ### add

    public void add(org.apache.catalina.Session session)
    Specified by:
      `add` in interface `org.apache.catalina.Manager`
    Overrides:
      `add` in class `org.apache.catalina.session.ManagerBase`

  - ### getRejectedSessions

    public int getRejectedSessions()
    Specified by:
      `getRejectedSessions` in interface `org.apache.catalina.Manager`
    Overrides:
      `getRejectedSessions` in class `org.apache.catalina.session.ManagerBase`

  - ### setRejectedSessions

    public void setRejectedSessions(int rejectedSessions)

  - ### getActiveSessions

    public int getActiveSessions()
    Returns the number of active sessions
    Specified by:
      `getActiveSessions` in interface `org.apache.catalina.Manager`
    Overrides:
      `getActiveSessions` in class `org.apache.catalina.session.ManagerBase`
    Returns:
      number of sessions active

  - ### listSessionIds

    public String listSessionIds()
    For debugging: return a list of all session ids currently active
    Overrides:
      `listSessionIds` in class `org.apache.catalina.session.ManagerBase`

  - ### getSessionsToTouch

    protected Set<String> getSessionsToTouch()

  - ### scheduleTimerTasks

    protected void scheduleTimerTasks()

  - ### cancelTimer

    protected void cancelTimer()

  - ### load

    public void load() throws ClassNotFoundException, IOException
    Specified by:
      `load` in interface `org.apache.catalina.Manager`
    Throws:
      `ClassNotFoundException`
      `IOException`

  - ### unload

    public void unload() throws IOException
    Specified by:
      `unload` in interface `org.apache.catalina.Manager`
    Throws:
      `IOException`

  - ### registerJvmRouteBinderValve

    protected void registerJvmRouteBinderValve()

  - ### getPipeline

    protected abstract org.apache.catalina.Pipeline getPipeline()

  - ### unregisterJvmRouteBinderValve

    protected void unregisterJvmRouteBinderValve()

  - ### registerCommitSessionValve

    protected void registerCommitSessionValve()

  - ### createCommitSessionValve

    protected abstract CommitSessionValveT createCommitSessionValve()

  - ### unregisterCommitSessionValve

    protected void unregisterCommitSessionValve()

  - ### propertyChange

    public void propertyChange(PropertyChangeEvent event)
    Process property change events from our associated Context.

    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:

    1. the max inactive interval is set based on the Manager defined in the context.xml
    2. the max inactive interval is then overwritten by the value of the Context's session timeout when setContainer is called
    3. the max inactive interval is then overwritten by the value of the session-timeout specified in the web.xml (if any)
    Specified by:
      `propertyChange` in interface `PropertyChangeListener`
    Parameters:
      `event` - The property change event that has occurred

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `org.apache.catalina.session.ManagerBase`

  - ### getTheContext

    public abstract org.apache.catalina.Context getTheContext()

  - ### getMaxInactiveInterval

    public abstract int getMaxInactiveInterval()
    Specified by:
      `getMaxInactiveInterval` in interface `SessionManager`

  - ### setMaxInactiveInterval

    public abstract void setMaxInactiveInterval(int interval)