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 void
add(Session session)
Add this Session to the set of active Sessions for this Manager.void
createBackingStore(String persistenceType, String storeName, Class<T> metadataClass, Map<String,Object> vendorMap)
void
doValveSave(Session session)
called from valve; does the save of sessionString
getInfo()
Return descriptive information about this Manager implementation and the corresponding version number, in the format<description>/<version>
.String
getName()
Return the descriptive short name of this Manager implementation.String
getReplicaFromPredictor(String sessionId, String oldJreplicaValue)
void
postRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)
protected void
processMaxActiveSwaps()
Swap idle sessions out to Store if too many are active Hercules: modified methodprotected void
processMaxIdleBackups()
Back up idle sessions.protected void
processMaxIdleSwaps()
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:
getInfo
in interfaceManager
- Overrides:
getInfo
in classPersistentManagerBase
-
add
public void add(Session session)
Description copied from class:ManagerBase
Add this Session to the set of active Sessions for this Manager.- Specified by:
add
in interfaceManager
- Overrides:
add
in classManagerBase
- Parameters:
session
- Session to be added
-
doValveSave
public void doValveSave(Session session)
called from valve; does the save of session- Specified by:
doValveSave
in interfaceWebEventPersistentManager
- Specified by:
doValveSave
in 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:
postRequestDispatcherProcess
in interfaceManager
- Overrides:
postRequestDispatcherProcess
in classManagerBase
-
getName
public String getName()
Return the descriptive short name of this Manager implementation.- Overrides:
getName
in 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:
processMaxIdleBackups
in classPersistentManagerBase
-
processMaxActiveSwaps
protected void processMaxActiveSwaps()
Swap idle sessions out to Store if too many are active Hercules: modified method- Overrides:
processMaxActiveSwaps
in classPersistentManagerBase
-
processMaxIdleSwaps
protected void processMaxIdleSwaps()
Swap idle sessions out to Store if they are idle too long.- Overrides:
processMaxIdleSwaps
in classPersistentManagerBase
-
getReplicaFromPredictor
public String getReplicaFromPredictor(String sessionId, String oldJreplicaValue)
- Specified by:
getReplicaFromPredictor
in 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:
createBackingStore
in classReplicationManagerBase<T extends org.glassfish.ha.store.api.Storeable>
-
-