PersistentManager (Apache Tomcat 11.0.24 API Documentation)
Description: declaration: package: org.apache.catalina.session, class: PersistentManager

# Class PersistentManager

java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.session.ManagerBase
org.apache.catalina.session.PersistentManagerBase
org.apache.catalina.session.PersistentManager

All Implemented Interfaces:
  `MBeanRegistration, DistributedManager, JmxEnabled, Lifecycle, Manager, StoreManager`

public final class PersistentManager extends PersistentManagerBase
Implementation of the Manager interface that makes use of a Store to swap active Sessions to disk. It can be configured to achieve several different goals:

- Persist sessions across restarts of the Container
- Fault tolerance, keep sessions backed up on disk to allow recovery in the event of unplanned restarts.
- Limit the number of active sessions kept in memory by swapping less active sessions out to disk.

If used with a load-balancer, the load-balancer must be configured to use sticky sessions for this manager to operate correctly.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class ManagerBase

  `ManagerBase.SessionTiming`

  ### Nested classes/interfaces inherited from interface Lifecycle

  `Lifecycle.SingleUse`

- ## Field Summary

  ### Fields inherited from class PersistentManagerBase

  `maxIdleBackup, maxIdleSwap, minIdleSwap, saveOnRestart, store`

  ### Fields inherited from class ManagerBase

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

  ### Fields inherited from interface 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
  `PersistentManager()`
  Construct a new `PersistentManager` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getName()`
  Returns the descriptive short name of this Manager implementation.

  ### Methods inherited from class PersistentManagerBase

  `clearStore, findSession, getActiveSessionsFull, getMaxIdleBackup, getMaxIdleSwap, getMinIdleSwap, getSaveOnRestart, getSessionIdsFull, getStore, isLoaded, load, processExpires, processMaxActiveSwaps, processMaxIdleBackups, processMaxIdleSwaps, processPersistenceChecks, remove, removeSession, removeSuper, setMaxIdleBackup, setMaxIdleSwap, setMinIdleSwap, setSaveOnRestart, setStore, startInternal, stopInternal, swapIn, swapOut, unload, writeSession`

  ### Methods inherited from class ManagerBase

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

  ### Methods inherited from class LifecycleMBeanBase

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

  ### Methods inherited from class LifecycleBase

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

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### PersistentManager

    public PersistentManager()
    Construct a new `PersistentManager` instance.

- ## Method Details

  - ### getName

    public String getName()
    Description copied from class: `ManagerBase`
    Returns the descriptive short name of this Manager implementation.
    Overrides:
      `getName` in class `PersistentManagerBase`
    Returns:
      The descriptive short name of this Manager implementation.