org.apache.catalina.ha.session
Class ClusterManagerBase
java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.session.ManagerBase
org.apache.catalina.ha.session.ClusterManagerBase
- All Implemented Interfaces:
- PropertyChangeListener, EventListener, MBeanRegistration, ClusterManager, Lifecycle, Manager
- Direct Known Subclasses:
- BackupManager, DeltaManager
public abstract class ClusterManagerBase
- extends ManagerBase
- implements ClusterManager
- Version:
- $Id: ClusterManagerBase.java 1346795 2012-06-06 09:08:36Z kfujino $
- Author:
- Filip Hanik
Fields inherited from class org.apache.catalina.session.ManagerBase |
container, distributable, duplicates, expiredSessions, maxActive, maxActiveSessions, maxInactiveInterval, processExpiresFrequency, processingTime, rejectedSessions, secureRandomAlgorithm, secureRandomClass, secureRandomProvider, sessionCounter, sessionCreationTiming, sessionExpirationTiming, sessionIdGenerator, sessionIdLength, 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 |
Methods inherited from class org.apache.catalina.session.ManagerBase |
add, addPropertyChangeListener, backgroundProcess, changeSessionId, createEmptySession, createSession, expireSession, findSession, findSessions, generateSessionId, getActiveSessions, getClassName, getContainer, getCreationTime, getCreationTimestamp, getDistributable, getDomainInternal, getDuplicates, getEngine, getExpiredSessions, getInfo, getJvmRoute, getLastAccessedTime, getLastAccessedTimestamp, getMaxActive, getMaxActiveSessions, getMaxInactiveInterval, getName, getNewSession, getObjectNameKeyProperties, getProcessExpiresFrequency, getProcessingTime, getRejectedSessions, getSecureRandomAlgorithm, getSecureRandomClass, getSecureRandomProvider, getSession, getSessionAttribute, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdLength, getSessionMaxAliveTime, getThisAccessedTime, getThisAccessedTimestamp, initInternal, listSessionIds, processExpires, propertyChange, remove, remove, removePropertyChangeListener, setContainer, setDistributable, setDuplicates, setExpiredSessions, setMaxActive, setMaxActiveSessions, setMaxInactiveInterval, setProcessExpiresFrequency, setProcessingTime, setSecureRandomAlgorithm, setSecureRandomClass, setSecureRandomProvider, setSessionCounter, setSessionIdLength, setSessionMaxAliveTime, startInternal, stopInternal, toString, updateSessionMaxAliveTime |
Methods inherited from class org.apache.catalina.util.LifecycleBase |
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop |
Methods inherited from interface org.apache.catalina.Manager |
add, addPropertyChangeListener, backgroundProcess, changeSessionId, createEmptySession, createSession, findSession, findSessions, getActiveSessions, getContainer, getDistributable, getExpiredSessions, getInfo, getMaxActive, getMaxInactiveInterval, getRejectedSessions, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdLength, getSessionMaxAliveTime, remove, remove, removePropertyChangeListener, setContainer, setDistributable, setExpiredSessions, setMaxActive, setMaxInactiveInterval, setSessionCounter, setSessionIdLength, setSessionMaxAliveTime |
cluster
protected CatalinaCluster cluster
- A reference to the cluster
ClusterManagerBase
public ClusterManagerBase()
getCluster
public CatalinaCluster getCluster()
- Specified by:
getCluster
in interface ClusterManager
setCluster
public void setCluster(CatalinaCluster cluster)
- Specified by:
setCluster
in interface ClusterManager
isNotifyListenersOnReplication
public boolean isNotifyListenersOnReplication()
- Specified by:
isNotifyListenersOnReplication
in interface ClusterManager
setNotifyListenersOnReplication
public void setNotifyListenersOnReplication(boolean notifyListenersOnReplication)
getSessionAttributeFilter
public String getSessionAttributeFilter()
- Return the string pattern used for including session attributes
to replication.
- Returns:
- the sessionAttributeFilter
setSessionAttributeFilter
public void setSessionAttributeFilter(String sessionAttributeFilter)
- Set the pattern used for including session attributes to replication.
If not set, all session attributes will be eligible for replication.
E.g. ^(userName|sessionHistory)$
- Parameters:
sessionAttributeFilter
- the filter name pattern to set
willAttributeDistribute
public boolean willAttributeDistribute(String name)
- Check whether the given session attribute should be distributed
- Returns:
- true if the attribute should be distributed
getClassLoaders
public static ClassLoader[] getClassLoaders(Container container)
getClassLoaders
public ClassLoader[] getClassLoaders()
getReplicationStream
public ReplicationStream getReplicationStream(byte[] data)
throws IOException
- Open Stream and use correct ClassLoader (Container) Switch
ThreadClassLoader
- Specified by:
getReplicationStream
in interface ClusterManager
- Parameters:
data
-
- Returns:
- The object input stream
- Throws:
IOException
getReplicationStream
public ReplicationStream getReplicationStream(byte[] data,
int offset,
int length)
throws IOException
- Specified by:
getReplicationStream
in interface ClusterManager
- Throws:
IOException
load
public void load()
Manager
implementations that also implement
ClusterManager
do not support local session persistence.
- Specified by:
load
in interface Manager
unload
public void unload()
- Description copied from interface:
Manager
- Save any currently active sessions in the appropriate persistence
mechanism, if any. If persistence is not supported, this method
returns without doing anything.
- Specified by:
unload
in interface Manager
clone
protected void clone(ClusterManagerBase copy)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.