org.apache.axis2.clustering.tribes
Class TribesClusterManager

java.lang.Object
  extended by org.apache.axis2.clustering.tribes.TribesClusterManager
All Implemented Interfaces:
ClusterManager, ParameterInclude

public class TribesClusterManager
extends java.lang.Object
implements ClusterManager

The main ClusterManager class for the Tribes based clustering implementation


Constructor Summary
TribesClusterManager()
           
 
Method Summary
 void addLoadBalanceEventHandler(LoadBalanceEventHandler eventHandler, java.lang.String applicationDomain)
          Set the load balance event handler which will be notified when load balance events occur.
 void addParameter(Parameter param)
          Method addParameter.
 void deserializeParameters(org.apache.axiom.om.OMElement parameterElement)
           
 ConfigurationManager getConfigurationManager()
           
 ContextManager getContextManager()
           
 java.util.Set<java.lang.String> getDomains()
          Get all the domains that this ClusterManager belongs to
 LoadBalanceEventHandler getLoadBalanceEventHandler(java.lang.String applicationDomain)
          Get the LoadBalanceEventHandler which corresponds to the applicationDomain This will be valid only when this node is running in loadBalance mode
 java.util.List<Member> getMembers()
          Get the list of members in a static group
 Parameter getParameter(java.lang.String name)
          Method getParameter.
 java.util.ArrayList getParameters()
          Gets all the parameters in a given description.
 void init()
          Initialize the cluster.
 boolean isParameterLocked(java.lang.String parameterName)
          Checks whether the parameter is locked at any level.
 void removeParameter(Parameter param)
           
 void setConfigurationContext(ConfigurationContext configurationContext)
          Set the system's configuration context.
 void setConfigurationManager(ConfigurationManager configurationManager)
          Set the ConfigurationManager corresponding to this ClusterManager.
 void setContextManager(ContextManager contextManager)
          Set the ContextManager corresponding to this ClusterManager.
 void setMembers(java.util.List<Member> members)
          Set the static members of the cluster.
 void shutdown()
          Shutdown the cluster.
 boolean synchronizeAllMembers()
          Method to check whether all members in the cluster have to be kept in sync at all times.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TribesClusterManager

public TribesClusterManager()
Method Detail

setMembers

public void setMembers(java.util.List<Member> members)
Description copied from interface: ClusterManager
Set the static members of the cluster. This is used only with static group membership

Specified by:
setMembers in interface ClusterManager
Parameters:
members - Members to be added

getMembers

public java.util.List<Member> getMembers()
Description copied from interface: ClusterManager
Get the list of members in a static group

Specified by:
getMembers in interface ClusterManager
Returns:
The members if static group membership is used. If any other membership scheme is used, the values returned may not be valid

addLoadBalanceEventHandler

public void addLoadBalanceEventHandler(LoadBalanceEventHandler eventHandler,
                                       java.lang.String applicationDomain)
Description copied from interface: ClusterManager
Set the load balance event handler which will be notified when load balance events occur. This will be valid only when this node is running in loadBalance mode

Specified by:
addLoadBalanceEventHandler in interface ClusterManager
Parameters:
eventHandler - The load balance event handler
applicationDomain - The application domain which is handled by the eventHandler

getLoadBalanceEventHandler

public LoadBalanceEventHandler getLoadBalanceEventHandler(java.lang.String applicationDomain)
Description copied from interface: ClusterManager
Get the LoadBalanceEventHandler which corresponds to the applicationDomain This will be valid only when this node is running in loadBalance mode

Specified by:
getLoadBalanceEventHandler in interface ClusterManager
Parameters:
applicationDomain - The application domain to which the application nodes being load balanced belong to
Returns:
LoadBalanceEventHandler which corresponds to the applicationDomain

getDomains

public java.util.Set<java.lang.String> getDomains()
Description copied from interface: ClusterManager
Get all the domains that this ClusterManager belongs to

Specified by:
getDomains in interface ClusterManager
Returns:
the domains of this ClusterManager

getContextManager

public ContextManager getContextManager()
Specified by:
getContextManager in interface ClusterManager
Returns:
The ContextManager

getConfigurationManager

public ConfigurationManager getConfigurationManager()
Specified by:
getConfigurationManager in interface ClusterManager
Returns:
The ConfigurationManager

init

public void init()
          throws ClusteringFault
Initialize the cluster.

Specified by:
init in interface ClusterManager
Throws:
ClusteringFault - If initialization fails

setConfigurationManager

public void setConfigurationManager(ConfigurationManager configurationManager)
Description copied from interface: ClusterManager
Set the ConfigurationManager corresponding to this ClusterManager. This is an optional attribute. We can have a cluster with no configuration management, in which case the configurationManager will be null. This value is set by the ClusterBuilder, by reading the "configurationManager" element in the axis2.xml

e.g.

Specified by:
setConfigurationManager in interface ClusterManager
Parameters:
configurationManager - The ConfigurationManager instance

setContextManager

public void setContextManager(ContextManager contextManager)
Description copied from interface: ClusterManager
Set the ContextManager corresponding to this ClusterManager. This is an optional attribute. We can have a cluster with no context replication, in which case the contextManager will be null. This value is set by the ClusterBuilder, by reading the "contextManager" element in the axis2.xml

e.g.

Specified by:
setContextManager in interface ClusterManager
Parameters:
contextManager - The ContextManager instance

addParameter

public void addParameter(Parameter param)
                  throws AxisFault
Description copied from interface: ParameterInclude
Method addParameter.

Specified by:
addParameter in interface ParameterInclude
Throws:
AxisFault

deserializeParameters

public void deserializeParameters(org.apache.axiom.om.OMElement parameterElement)
                           throws AxisFault
Specified by:
deserializeParameters in interface ParameterInclude
Throws:
AxisFault

getParameter

public Parameter getParameter(java.lang.String name)
Description copied from interface: ParameterInclude
Method getParameter.

Specified by:
getParameter in interface ParameterInclude
Returns:
Returns Parameter.

getParameters

public java.util.ArrayList getParameters()
Description copied from interface: ParameterInclude
Gets all the parameters in a given description.

Specified by:
getParameters in interface ParameterInclude
Returns:
Returns ArrayList.

isParameterLocked

public boolean isParameterLocked(java.lang.String parameterName)
Description copied from interface: ParameterInclude
Checks whether the parameter is locked at any level.

Specified by:
isParameterLocked in interface ParameterInclude

removeParameter

public void removeParameter(Parameter param)
                     throws AxisFault
Specified by:
removeParameter in interface ParameterInclude
Throws:
AxisFault

shutdown

public void shutdown()
              throws ClusteringFault
Shutdown the cluster. This member will leave the cluster when this method is called.

Specified by:
shutdown in interface ClusterManager
Throws:
ClusteringFault - If an error occurs while shutting down

setConfigurationContext

public void setConfigurationContext(ConfigurationContext configurationContext)
Description copied from interface: ClusterManager
Set the system's configuration context. This will be used by the clustering implementations to get information about the Axis2 environment and to correspond with the Axis2 environment

Specified by:
setConfigurationContext in interface ClusterManager
Parameters:
configurationContext - The configuration context

synchronizeAllMembers

public boolean synchronizeAllMembers()
Method to check whether all members in the cluster have to be kept in sync at all times. Typically, this will require each member in the cluster to ACKnowledge receipt of a particular message, which may have a significant performance hit.

Returns:
true - if all members in the cluster should be kept in sync at all times, false otherwise


Copyright © 2007 Apache Web Services Project. All Rights Reserved.