Package org.apache.catalina.ha
Interface ClusterManager
- 
- All Superinterfaces:
- Manager
 - All Known Implementing Classes:
- BackupManager,- ClusterManagerBase,- DeltaManager
 
 public interface ClusterManager extends Manager The common interface used by all cluster manager. This is so that we can have a more pluggable way of swapping session managers for different algorithms.- Author:
- Peter Rossbach
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description ClusterManagercloneFromTemplate()CatalinaClustergetCluster()java.lang.String[]getInvalidatedSessions()When the manager expires session not tied to a request.java.lang.StringgetName()Return the name of the manager, at host /context name and at engine hostname+/context.ReplicationStreamgetReplicationStream(byte[] data)Open stream and use correct ClassLoader (Container), switching thread context class loader.ReplicationStreamgetReplicationStream(byte[] data, int offset, int length)booleanisNotifyListenersOnReplication()voidmessageDataReceived(ClusterMessage msg)A message was received from another node, this is the callback method to implement if you are interested in receiving replication messages.ClusterMessagerequestCompleted(java.lang.String sessionId)When the request has been completed, the replication valve will notify the manager, and the manager will decide whether any replication is needed or not.voidsetCluster(CatalinaCluster cluster)voidsetName(java.lang.String name)Set the name of the manager, at host /context name and at engine hostname+/context- 
Methods inherited from interface org.apache.catalina.Manageradd, addPropertyChangeListener, backgroundProcess, changeSessionId, changeSessionId, createEmptySession, createSession, findSession, findSessions, getActiveSessions, getContext, getExpiredSessions, getMaxActive, getRejectedSessions, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdGenerator, getSessionMaxAliveTime, load, remove, remove, removePropertyChangeListener, setContext, setExpiredSessions, setMaxActive, setSessionCounter, setSessionIdGenerator, setSessionMaxAliveTime, unload, willAttributeDistribute
 
- 
 
- 
- 
- 
Method Detail- 
messageDataReceivedvoid messageDataReceived(ClusterMessage msg) A message was received from another node, this is the callback method to implement if you are interested in receiving replication messages.- Parameters:
- msg- - the message received.
 
 - 
requestCompletedClusterMessage requestCompleted(java.lang.String sessionId) When the request has been completed, the replication valve will notify the manager, and the manager will decide whether any replication is needed or not. If there is a need for replication, the manager will create a session message and that will be replicated. The cluster determines where it gets sent.- Parameters:
- sessionId- - the sessionId that just completed.
- Returns:
- a SessionMessage to be sent.
 
 - 
getInvalidatedSessionsjava.lang.String[] getInvalidatedSessions() When the manager expires session not tied to a request. The cluster will periodically ask for a list of sessions that should expire and that should be sent across the wire.- Returns:
- String[] The invalidated sessions
 
 - 
getNamejava.lang.String getName() Return the name of the manager, at host /context name and at engine hostname+/context.- Returns:
- String
- Since:
- 5.5.10
 
 - 
setNamevoid setName(java.lang.String name) Set the name of the manager, at host /context name and at engine hostname+/context- Parameters:
- name- The manager name
- Since:
- 5.5.10
 
 - 
getClusterCatalinaCluster getCluster() 
 - 
setClustervoid setCluster(CatalinaCluster cluster) 
 - 
getReplicationStreamReplicationStream getReplicationStream(byte[] data) throws java.io.IOException Open stream and use correct ClassLoader (Container), switching thread context class loader.- Parameters:
- data- The data
- Returns:
- The object input stream
- Throws:
- java.io.IOException- An error occurred
 
 - 
getReplicationStreamReplicationStream getReplicationStream(byte[] data, int offset, int length) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
isNotifyListenersOnReplicationboolean isNotifyListenersOnReplication() 
 - 
cloneFromTemplateClusterManager cloneFromTemplate() 
 
- 
 
-