Package org.apache.catalina.ha
Interface ClusterManager
- All Superinterfaces:
Manager
- All Known Implementing Classes:
BackupManager
,ClusterManagerBase
,DeltaManager
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 Summary
Modifier and TypeMethodDescriptionString[]
When the manager expires session not tied to a request.getName()
Return the name of the manager, at host /context name and at engine hostname+/context.getReplicationStream
(byte[] data) Open stream and use correct ClassLoader (Container), switching thread context class loader.getReplicationStream
(byte[] data, int offset, int length) Open stream and use correct ClassLoader (Container), switching thread context class loader.boolean
void
A message was received from another node, this is the callback method to implement if you are interested in receiving replication messages.requestCompleted
(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.void
setCluster
(CatalinaCluster cluster) Set the cluster associated with this manager.void
Set the name of the manager, at host /context name and at engine hostname+/contextMethods inherited from interface org.apache.catalina.Manager
add, addPropertyChangeListener, backgroundProcess, changeSessionId, createEmptySession, createSession, findSession, findSessions, getActiveSessions, getContext, getExpiredSessions, getMaxActive, getNotifyAttributeListenerOnUnchangedValue, getNotifyBindingListenerOnUnchangedValue, getRejectedSessions, getSessionActivityCheck, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdGenerator, getSessionLastAccessAtStart, getSessionMaxAliveTime, load, remove, remove, removePropertyChangeListener, rotateSessionId, setContext, setExpiredSessions, setMaxActive, setNotifyAttributeListenerOnUnchangedValue, setNotifyBindingListenerOnUnchangedValue, setSessionActivityCheck, setSessionIdGenerator, setSessionLastAccessAtStart, setSessionMaxAliveTime, unload, willAttributeDistribute
-
Method Details
-
messageDataReceived
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.
-
requestCompleted
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.
-
getInvalidatedSessions
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
-
getName
String getName()Return the name of the manager, at host /context name and at engine hostname+/context.- Returns:
- String
- Since:
- 5.5.10
-
setName
Set the name of the manager, at host /context name and at engine hostname+/context- Parameters:
name
- The manager name- Since:
- 5.5.10
-
getCluster
CatalinaCluster getCluster()- Returns:
- the cluster associated with this manager
-
setCluster
Set the cluster associated with this manager.- Parameters:
cluster
- the cluster
-
getReplicationStream
Open stream and use correct ClassLoader (Container), switching thread context class loader.- Parameters:
data
- the data- Returns:
- the object input stream
- Throws:
IOException
- An error occurred
-
getReplicationStream
Open stream and use correct ClassLoader (Container), switching thread context class loader.- Parameters:
data
- the dataoffset
- the offset in the data arraylength
- the data length- Returns:
- the object input stream
- Throws:
IOException
- An error occurred
-
isNotifyListenersOnReplication
boolean isNotifyListenersOnReplication()- Returns:
true
if listeners are notified on replication
-
cloneFromTemplate
ClusterManager cloneFromTemplate()- Returns:
- a clone of a template manager configuration
-