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 void
addParameter(Parameter param)
Method addParameter.void
commit()
Second phase of the 2-phase commit protocol.void
deserializeParameters(OMElement parameterElement)
void
exceptionOccurred(Throwable throwable)
To notify other nodes that an Exception occurred, during the processing of aNodeManagementCommand
Parameter
getParameter(String name)
Method getParameter.ArrayList
getParameters()
Gets all the parameters in a given description.boolean
isParameterLocked(String parameterName)
Checks whether the parameter is locked at any level.void
prepare()
First phase of the 2-phase commit protocol.void
removeParameter(Parameter param)
void
rollback()
Rollback whatever was doneprotected void
send(Throwable throwable)
void
sendMessage(NodeManagementCommand command)
Execute a NodeManagementCommandvoid
setConfigurationContext(ConfigurationContext configurationContext)
Set the system's configuration context.void
setSender(MessageSender sender)
-
-
-
Method Detail
-
commit
public void commit() throws ClusteringFault
Description copied from interface:NodeManager
Second phase of the 2-phase commit protocol. Notifies a node that it needs to switch to a new configuration.- Specified by:
commit
in 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:NodeManager
To notify other nodes that an Exception occurred, during the processing of aNodeManagementCommand
- Specified by:
exceptionOccurred
in 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 ClusteringFault
Description copied from interface:NodeManager
First phase of the 2-phase commit protocol. Notifies a node that it needs to prepare to switch to a new configuration.- Specified by:
prepare
in interfaceNodeManager
- Throws:
ClusteringFault
- If an error occurs while preparing to commit
-
rollback
public void rollback() throws ClusteringFault
Description copied from interface:NodeManager
Rollback whatever was done- Specified by:
rollback
in 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:NodeManager
Execute a NodeManagementCommand- Specified by:
sendMessage
in 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:NodeManager
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 interfaceNodeManager
- Parameters:
configurationContext
- The configuration context
-
addParameter
public void addParameter(Parameter param) throws AxisFault
Description copied from interface:ParameterInclude
Method addParameter.- Specified by:
addParameter
in interfaceParameterInclude
- Throws:
AxisFault
-
removeParameter
public void removeParameter(Parameter param) throws AxisFault
- Specified by:
removeParameter
in interfaceParameterInclude
- Throws:
AxisFault
-
getParameter
public Parameter getParameter(String name)
Description copied from interface:ParameterInclude
Method getParameter.- Specified by:
getParameter
in interfaceParameterInclude
- Returns:
- Returns Parameter.
-
getParameters
public ArrayList getParameters()
Description copied from interface:ParameterInclude
Gets all the parameters in a given description.- Specified by:
getParameters
in interfaceParameterInclude
- Returns:
- Returns ArrayList.
-
isParameterLocked
public boolean isParameterLocked(String parameterName)
Description copied from interface:ParameterInclude
Checks whether the parameter is locked at any level.- Specified by:
isParameterLocked
in interfaceParameterInclude
-
deserializeParameters
public void deserializeParameters(OMElement parameterElement) throws AxisFault
- Specified by:
deserializeParameters
in interfaceParameterInclude
- Throws:
AxisFault
-
-