public abstract class ClusterManagerBase extends ManagerBase implements ClusterManager
ManagerBase.SessionTiming| Modifier and Type | Field and Description |
|---|---|
protected CatalinaCluster |
cluster
A reference to the cluster
|
distributable, duplicates, expiredSessions, maxActive, maxActiveSessions, maxInactiveInterval, processExpiresFrequency, processingTime, rejectedSessions, secureRandomAlgorithm, secureRandomClass, secureRandomProvider, SESSION_ID_LENGTH_UNSET, sessionCounter, sessionCreationTiming, sessionExpirationTiming, sessionIdGenerator, sessionIdGeneratorClass, sessionIdLength, sessionMaxAliveTime, sessions, sm, support, TIMING_STATS_CACHE_SIZEmserverAFTER_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 and Description |
|---|
ClusterManagerBase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clone(ClusterManagerBase copy) |
ClassLoader[] |
getClassLoaders() |
static ClassLoader[] |
getClassLoaders(Context context) |
CatalinaCluster |
getCluster() |
ReplicationStream |
getReplicationStream(byte[] data)
Open Stream and use correct ClassLoader (Container) Switch
ThreadClassLoader
|
ReplicationStream |
getReplicationStream(byte[] data,
int offset,
int length) |
String |
getSessionAttributeFilter()
Return the string pattern used for including session attributes
to replication.
|
boolean |
isNotifyListenersOnReplication() |
boolean |
isRecordAllActions() |
void |
load()
Manager implementations that also implement
ClusterManager do not support local session persistence. |
protected void |
registerSessionAtReplicationValve(DeltaSession session)
Register cross context session at replication valve thread local
|
void |
setCluster(CatalinaCluster cluster) |
void |
setNotifyListenersOnReplication(boolean notifyListenersOnReplication) |
void |
setRecordAllActions(boolean recordAllActions) |
void |
setSessionAttributeFilter(String sessionAttributeFilter)
Set the pattern used for including session attributes to replication.
|
protected void |
startInternal()
Sub-classes must ensure that the state is changed to
LifecycleState.STARTING during the execution of this method. |
protected void |
stopInternal()
Sub-classes must ensure that the state is changed to
LifecycleState.STOPPING during the execution of this method. |
void |
unload()
Save any currently active sessions in the appropriate persistence
mechanism, if any.
|
boolean |
willAttributeDistribute(String name)
Check whether the given session attribute should be distributed
|
add, addPropertyChangeListener, backgroundProcess, changeSessionId, changeSessionId, changeSessionId, createEmptySession, createSession, expireSession, findSession, findSessions, generateSessionId, getActiveSessions, getClassName, getContainer, getContext, getCreationTime, getCreationTimestamp, getDistributable, getDomainInternal, getDuplicates, getEngine, getExpiredSessions, getJvmRoute, getLastAccessedTime, getLastAccessedTimestamp, getMaxActive, getMaxActiveSessions, getMaxInactiveInterval, getName, getNewSession, getObjectNameKeyProperties, getProcessExpiresFrequency, getProcessingTime, getRejectedSessions, getSecureRandomAlgorithm, getSecureRandomClass, getSecureRandomProvider, getSession, getSessionAttribute, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdGenerator, getSessionIdLength, getSessionMaxAliveTime, getThisAccessedTime, getThisAccessedTimestamp, initInternal, listSessionIds, processExpires, propertyChange, remove, remove, removePropertyChangeListener, setContainer, setContext, setDistributable, setDuplicates, setExpiredSessions, setMaxActive, setMaxActiveSessions, setMaxInactiveInterval, setProcessExpiresFrequency, setProcessingTime, setSecureRandomAlgorithm, setSecureRandomClass, setSecureRandomProvider, setSessionCounter, setSessionIdGenerator, setSessionIdLength, setSessionMaxAliveTime, toString, updateSessionMaxAliveTimedestroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregisteraddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloneFromTemplate, getInvalidatedSessions, getName, messageDataReceived, requestCompleted, setNameadd, addPropertyChangeListener, backgroundProcess, changeSessionId, changeSessionId, createEmptySession, createSession, findSession, findSessions, getActiveSessions, getContainer, getContext, getDistributable, getExpiredSessions, getMaxActive, getMaxInactiveInterval, getRejectedSessions, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdGenerator, getSessionIdLength, getSessionMaxAliveTime, remove, remove, removePropertyChangeListener, setContainer, setContext, setDistributable, setExpiredSessions, setMaxActive, setMaxInactiveInterval, setSessionCounter, setSessionIdGenerator, setSessionIdLength, setSessionMaxAliveTimeprotected CatalinaCluster cluster
public CatalinaCluster getCluster()
getCluster in interface ClusterManagerpublic void setCluster(CatalinaCluster cluster)
setCluster in interface ClusterManagerpublic boolean isNotifyListenersOnReplication()
isNotifyListenersOnReplication in interface ClusterManagerpublic void setNotifyListenersOnReplication(boolean notifyListenersOnReplication)
public String getSessionAttributeFilter()
public void setSessionAttributeFilter(String sessionAttributeFilter)
E.g. ^(userName|sessionHistory)$
sessionAttributeFilter - the filter name pattern to setpublic boolean isRecordAllActions()
public void setRecordAllActions(boolean recordAllActions)
public boolean willAttributeDistribute(String name)
public static ClassLoader[] getClassLoaders(Context context)
public ClassLoader[] getClassLoaders()
public ReplicationStream getReplicationStream(byte[] data) throws IOException
getReplicationStream in interface ClusterManagerdata - IOExceptionpublic ReplicationStream getReplicationStream(byte[] data, int offset, int length) throws IOException
getReplicationStream in interface ClusterManagerIOExceptionpublic void load()
Manager implementations that also implement
ClusterManager do not support local session persistence.public void unload()
Managerprotected void clone(ClusterManagerBase copy)
protected void registerSessionAtReplicationValve(DeltaSession session)
session - cross context sessionprotected void startInternal()
throws LifecycleException
LifecycleBaseLifecycleState.STARTING during the execution of this method.
Changing state will trigger the Lifecycle.START_EVENT event.
If a component fails to start it may either throw a
LifecycleException which will cause it's parent to fail to start
or it can place itself in the error state in which case LifecycleBase.stop()
will be called on the failed component but the parent component will
continue to start normally.startInternal in class ManagerBaseLifecycleExceptionprotected void stopInternal()
throws LifecycleException
LifecycleBaseLifecycleState.STOPPING during the execution of this method.
Changing state will trigger the Lifecycle.STOP_EVENT event.stopInternal in class ManagerBaseLifecycleExceptionCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.