Apache Tomcat 6.0.53

org.apache.catalina.ha
Interface ClusterManager

All Superinterfaces:
Manager
All Known Implementing Classes:
BackupManager, ClusterManagerBase, DeltaManager, SimpleTcpReplicationManager

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:
Filip Hanik, Peter Rossbach

Method Summary
 ClusterManager cloneFromTemplate()
           
 boolean doDomainReplication()
           
 CatalinaCluster getCluster()
           
 java.lang.String[] getInvalidatedSessions()
          When the manager expires session not tied to a request.
 java.lang.String getName()
          Return the name of the manager, at host /context name and at engine hostname+/context.
 ReplicationStream getReplicationStream(byte[] data)
           
 ReplicationStream getReplicationStream(byte[] data, int offset, int length)
           
 boolean isDefaultMode()
           
 boolean isNotifyListenersOnReplication()
           
 void 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.
 ClusterMessage 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.
 void setCluster(CatalinaCluster cluster)
           
 void setDefaultMode(boolean mode)
           
 void setDomainReplication(boolean domainReplication)
           
 void setName(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.Manager
add, addPropertyChangeListener, backgroundProcess, changeSessionId, createEmptySession, createSession, createSession, findSession, findSessions, getActiveSessions, getContainer, getDistributable, getExpiredSessions, getInfo, getMaxActive, getMaxInactiveInterval, getRejectedSessions, getSessionAverageAliveTime, getSessionCounter, getSessionIdLength, getSessionMaxAliveTime, load, remove, removePropertyChangeListener, setContainer, setDistributable, setExpiredSessions, setMaxActive, setMaxInactiveInterval, setRejectedSessions, setSessionAverageAliveTime, setSessionCounter, setSessionIdLength, setSessionMaxAliveTime, unload, willAttributeDistribute
 

Method Detail

messageDataReceived

void 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.

requestCompleted

ClusterMessage 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.

getInvalidatedSessions

java.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

getName

java.lang.String getName()
Return the name of the manager, at host /context name and at engine hostname+/context.

Returns:
String
Since:
5.5.10

setName

void setName(java.lang.String name)
Set the name of the manager, at host /context name and at engine hostname+/context

Parameters:
name -
Since:
5.5.10

getCluster

CatalinaCluster getCluster()

setCluster

void setCluster(CatalinaCluster cluster)

doDomainReplication

boolean doDomainReplication()
Returns:
Manager send only to same cluster domain.
Since:
5.5.10

setDomainReplication

void setDomainReplication(boolean domainReplication)
Parameters:
domainReplication - Flag value.
Since:
5.5.10

setDefaultMode

void setDefaultMode(boolean mode)
Parameters:
mode - The mode
Since:
5.5.10

isDefaultMode

boolean isDefaultMode()
Since:
5.5.10

getReplicationStream

ReplicationStream getReplicationStream(byte[] data)
                                       throws java.io.IOException
Throws:
java.io.IOException

getReplicationStream

ReplicationStream getReplicationStream(byte[] data,
                                       int offset,
                                       int length)
                                       throws java.io.IOException
Throws:
java.io.IOException

isNotifyListenersOnReplication

boolean isNotifyListenersOnReplication()

cloneFromTemplate

ClusterManager cloneFromTemplate()

Apache Tomcat 6.0.53

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.