Class DefaultNodeManager
- java.lang.Object
-
- org.apache.axis2.clustering.management.DefaultNodeManager
-
- All Implemented Interfaces:
NodeManager,ParameterInclude
public class DefaultNodeManager extends Object implements NodeManager
-
-
Constructor Summary
Constructors Constructor Description DefaultNodeManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(Parameter param)Method addParameter.voidcommit()Second phase of the 2-phase commit protocol.voiddeserializeParameters(OMElement parameterElement)voidexceptionOccurred(Throwable throwable)To notify other nodes that an Exception occurred, during the processing of aNodeManagementCommandParametergetParameter(String name)Method getParameter.ArrayListgetParameters()Gets all the parameters in a given description.booleanisParameterLocked(String parameterName)Checks whether the parameter is locked at any level.voidprepare()First phase of the 2-phase commit protocol.voidremoveParameter(Parameter param)voidrollback()Rollback whatever was doneprotected voidsend(Throwable throwable)voidsendMessage(NodeManagementCommand command)Execute a NodeManagementCommandvoidsetConfigurationContext(ConfigurationContext configurationContext)Set the system's configuration context.voidsetSender(MessageSender sender)
-
-
-
Method Detail
-
commit
public void commit() throws ClusteringFaultDescription copied from interface:NodeManagerSecond phase of the 2-phase commit protocol. Notifies a node that it needs to switch to a new configuration.- Specified by:
commitin interfaceNodeManager- Throws:
ClusteringFault- If an error occurs while committing a cluster configuration transaction
-
exceptionOccurred
public void exceptionOccurred(Throwable throwable) throws ClusteringFault
Description copied from interface:NodeManagerTo notify other nodes that an Exception occurred, during the processing of aNodeManagementCommand- Specified by:
exceptionOccurredin interfaceNodeManager- Parameters:
throwable- The throwable which has to be propogated to other nodes- Throws:
ClusteringFault- If an error occurs while processing the exception message
-
prepare
public void prepare() throws ClusteringFaultDescription copied from interface:NodeManagerFirst phase of the 2-phase commit protocol. Notifies a node that it needs to prepare to switch to a new configuration.- Specified by:
preparein interfaceNodeManager- Throws:
ClusteringFault- If an error occurs while preparing to commit
-
rollback
public void rollback() throws ClusteringFaultDescription copied from interface:NodeManagerRollback whatever was done- Specified by:
rollbackin interfaceNodeManager- Throws:
ClusteringFault- If an error occurs while rolling back a cluster configuration transaction
-
send
protected void send(Throwable throwable) throws ClusteringFault
- Throws:
ClusteringFault
-
sendMessage
public void sendMessage(NodeManagementCommand command) throws ClusteringFault
Description copied from interface:NodeManagerExecute a NodeManagementCommand- Specified by:
sendMessagein interfaceNodeManager- Parameters:
command- The command to be executed- Throws:
ClusteringFault- If an error occurs while sending the message
-
setSender
public void setSender(MessageSender sender)
-
setConfigurationContext
public void setConfigurationContext(ConfigurationContext configurationContext)
Description copied from interface:NodeManagerSet 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:
setConfigurationContextin interfaceNodeManager- Parameters:
configurationContext- The configuration context
-
addParameter
public void addParameter(Parameter param) throws AxisFault
Description copied from interface:ParameterIncludeMethod addParameter.- Specified by:
addParameterin interfaceParameterInclude- Throws:
AxisFault
-
removeParameter
public void removeParameter(Parameter param) throws AxisFault
- Specified by:
removeParameterin interfaceParameterInclude- Throws:
AxisFault
-
getParameter
public Parameter getParameter(String name)
Description copied from interface:ParameterIncludeMethod getParameter.- Specified by:
getParameterin interfaceParameterInclude- Returns:
- Returns Parameter.
-
getParameters
public ArrayList getParameters()
Description copied from interface:ParameterIncludeGets all the parameters in a given description.- Specified by:
getParametersin interfaceParameterInclude- Returns:
- Returns ArrayList.
-
isParameterLocked
public boolean isParameterLocked(String parameterName)
Description copied from interface:ParameterIncludeChecks whether the parameter is locked at any level.- Specified by:
isParameterLockedin interfaceParameterInclude
-
deserializeParameters
public void deserializeParameters(OMElement parameterElement) throws AxisFault
- Specified by:
deserializeParametersin interfaceParameterInclude- Throws:
AxisFault
-
-