Class ReplicationWebEventPersistentManager<T extends org.glassfish.ha.store.api.Storeable>
- java.lang.Object
-
- org.apache.catalina.session.ManagerBase
-
- org.apache.catalina.session.PersistentManagerBase
-
- org.glassfish.web.ha.session.management.ReplicationManagerBase<T>
-
- org.glassfish.web.ha.session.management.ReplicationWebEventPersistentManager<T>
-
- All Implemented Interfaces:
PropertyChangeListener,EventListener,Lifecycle,Manager,WebEventPersistentManager
@Service @PerLookup public class ReplicationWebEventPersistentManager<T extends org.glassfish.ha.store.api.Storeable> extends ReplicationManagerBase<T> implements WebEventPersistentManager
- Author:
- Rajiv Mordani
-
-
Field Summary
-
Fields inherited from class org.glassfish.web.ha.session.management.ReplicationManagerBase
_logger, backingStore, disableJreplica, relaxCacheVersionSemantics, sessionFactory
-
Fields inherited from class org.apache.catalina.session.PersistentManagerBase
invalidatedSessions, lifecycle
-
Fields inherited from class org.apache.catalina.session.ManagerBase
container, debug, devRandomSource, distributable, domain, duplicates, entropy, expiredSessions, initialized, log, maxActive, maxActiveUpdateLock, maxInactiveInterval, oname, randomClass, randomIS, rb, rejectedSessions, sessionAverageAliveTime, sessionCounter, sessionIdLength, sessionLocker, sessionMaxAliveTime, sessions, support, uuidGenerator
-
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
-
-
Constructor Summary
Constructors Constructor Description ReplicationWebEventPersistentManager()Creates a new instance of ReplicationWebEventPersistentManager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Session session)Add this Session to the set of active Sessions for this Manager.voidcreateBackingStore(String persistenceType, String storeName, Class<T> metadataClass, Map<String,Object> vendorMap)voiddoValveSave(Session session)called from valve; does the save of sessionStringgetInfo()Return descriptive information about this Manager implementation and the corresponding version number, in the format<description>/<version>.StringgetName()Return the descriptive short name of this Manager implementation.StringgetReplicaFromPredictor(String sessionId, String oldJreplicaValue)voidpostRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)protected voidprocessMaxActiveSwaps()Swap idle sessions out to Store if too many are active Hercules: modified methodprotected voidprocessMaxIdleBackups()Back up idle sessions.protected voidprocessMaxIdleSwaps()Swap idle sessions out to Store if they are idle too long.-
Methods inherited from class org.glassfish.web.ha.session.management.ReplicationManagerBase
createEmptySession, createNewSession, doRemove, findSession, getBackingStore, isDisableJreplica, isRelaxCacheVersionSemantics, isSessionVersioningSupported, removeSessionFromManagerCache, setBackingStore, setDisableJreplica, setRelaxCacheVersionSemantics, setSessionFactory
-
Methods inherited from class org.apache.catalina.session.PersistentManagerBase
addLifecycleListener, addToInvalidatedSessions, backgroundProcess, clearStore, createSession, createSession, findLifecycleListeners, findSession, findSession, getMaxActiveSessions, getMaxIdleBackup, getMaxIdleSwap, getMinIdleSwap, getSaveOnRestart, getStore, isLoaded, isSessionIdValid, isStarted, load, processExpires, processInvalidatedSessions, processPersistenceChecks, propertyChange, release, remove, remove, removeFromInvalidatedSessions, removeLifecycleListener, removeSuper, setContainer, setMaxActiveSessions, setMaxIdleBackup, setMaxIdleSwap, setMinIdleSwap, setSaveOnRestart, setStarted, setStore, start, stop, superFindSession, swapIn, swapIn, swapOut, unload, writeSession
-
Methods inherited from class org.apache.catalina.session.ManagerBase
addPropertyChangeListener, changeSessionId, checkSessionAttribute, clearSessions, destroy, expireSession, findSession, findSessions, generateSessionId, generateSessionId, getActiveSessions, getClassName, getContainer, getDebug, getDistributable, getDomain, getDuplicates, getEngine, getEntropy, getExpiredSessions, getJvmRoute, getLastAccessedTimeMillis, getMaxActive, getMaxInactiveInterval, getMaxInactiveIntervalSeconds, getNewSession, getObjectName, getRandom, getRandomBytes, getRandomClass, getRandomFile, getRejectedSessions, getSessionAttribute, getSessionAverageAliveTime, getSessionAverageAliveTimeSeconds, getSessionCount, getSessionCounter, getSessionIdLength, getSessionMaxAliveTime, getSessionMaxAliveTimeSeconds, getUuidGenerator, init, listSessionIds, lockSession, log, log, preRequestDispatcherProcess, removePropertyChangeListener, resetRandom, setDebug, setDistributable, setDuplicates, setEntropy, setExpiredSessions, setMaxActive, setMaxInactiveInterval, setMaxInactiveIntervalSeconds, setRandomClass, setRandomFile, setRejectedSessions, setSessionAverageAliveTime, setSessionAverageAliveTimeSeconds, setSessionCount, setSessionCounter, setSessionIdLength, setSessionLocker, setSessionMaxAliveTime, setSessionMaxAliveTimeSeconds, setUuidGenerator, toCookie, unlockSession, update
-
-
-
-
Method Detail
-
getInfo
public String getInfo()
Return descriptive information about this Manager implementation and the corresponding version number, in the format<description>/<version>.- Specified by:
getInfoin interfaceManager- Overrides:
getInfoin classPersistentManagerBase
-
add
public void add(Session session)
Description copied from class:ManagerBaseAdd this Session to the set of active Sessions for this Manager.- Specified by:
addin interfaceManager- Overrides:
addin classManagerBase- Parameters:
session- Session to be added
-
doValveSave
public void doValveSave(Session session)
called from valve; does the save of session- Specified by:
doValveSavein interfaceWebEventPersistentManager- Specified by:
doValveSavein classReplicationManagerBase<T extends org.glassfish.ha.store.api.Storeable>- Parameters:
session- The session to store
-
postRequestDispatcherProcess
public void postRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)- Specified by:
postRequestDispatcherProcessin interfaceManager- Overrides:
postRequestDispatcherProcessin classManagerBase
-
getName
public String getName()
Return the descriptive short name of this Manager implementation.- Overrides:
getNamein classPersistentManagerBase
-
processMaxIdleBackups
protected void processMaxIdleBackups()
Back up idle sessions. Hercules: modified method we do not want background saves when we are using web-event persistence-frequency- Overrides:
processMaxIdleBackupsin classPersistentManagerBase
-
processMaxActiveSwaps
protected void processMaxActiveSwaps()
Swap idle sessions out to Store if too many are active Hercules: modified method- Overrides:
processMaxActiveSwapsin classPersistentManagerBase
-
processMaxIdleSwaps
protected void processMaxIdleSwaps()
Swap idle sessions out to Store if they are idle too long.- Overrides:
processMaxIdleSwapsin classPersistentManagerBase
-
getReplicaFromPredictor
public String getReplicaFromPredictor(String sessionId, String oldJreplicaValue)
- Specified by:
getReplicaFromPredictorin classReplicationManagerBase<T extends org.glassfish.ha.store.api.Storeable>
-
createBackingStore
public void createBackingStore(String persistenceType, String storeName, Class<T> metadataClass, Map<String,Object> vendorMap)
- Specified by:
createBackingStorein classReplicationManagerBase<T extends org.glassfish.ha.store.api.Storeable>
-
-