org.apache.catalina.ha

Interface ClusterManager

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
ClusterManagercloneFromTemplate()
booleandoDomainReplication()
CatalinaClustergetCluster()
String[]getInvalidatedSessions()
When the manager expires session not tied to a request.
StringgetName()
Return the name of the manager, at host /context name and at engine hostname+/context.
ReplicationStreamgetReplicationStream(byte[] data)
ReplicationStreamgetReplicationStream(byte[] data, int offset, int length)
booleanisDefaultMode()
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(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)
voidsetDefaultMode(boolean mode)
voidsetDomainReplication(boolean domainReplication)
voidsetName(String name)
Set the name of the manager, at host /context name and at engine hostname+/context

Method Detail

cloneFromTemplate

public ClusterManager cloneFromTemplate()

doDomainReplication

public boolean doDomainReplication()

Returns: Manager send only to same cluster domain.

Since: 5.5.10

getCluster

public CatalinaCluster getCluster()

getInvalidatedSessions

public 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

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

Returns: String

Since: 5.5.10

getReplicationStream

public ReplicationStream getReplicationStream(byte[] data)

getReplicationStream

public ReplicationStream getReplicationStream(byte[] data, int offset, int length)

isDefaultMode

public boolean isDefaultMode()

Since: 5.5.10

isNotifyListenersOnReplication

public boolean isNotifyListenersOnReplication()

messageDataReceived

public 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

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

setCluster

public void setCluster(CatalinaCluster cluster)

setDefaultMode

public void setDefaultMode(boolean mode)

Parameters: mode The mode

Since: 5.5.10

setDomainReplication

public void setDomainReplication(boolean domainReplication)

Parameters: sendClusterDomainOnly Flag value.

Since: 5.5.10

setName

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

Parameters: name

Since: 5.5.10

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