Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.axis2.clustering.management
Interface NodeManager

All Superinterfaces:
  ParameterInclude

    public interface NodeManager

extends ParameterInclude

This interface is responsible for handling configuration management. Configuraion changes include

- Rebooting an entire cluster, in which case, all nodes have to load the new Axis2 configuration in a consistent manner
- Deploying a new service to a cluster or undeploying a service from a cluster
- Changing the policies of a service deployed on the cluster

It is not mandatory to have a NodeManager in a node. In which case the cluster may be used only for High Availability through context replication. However, it is difficult to imagine that a cluster will be deployed in production with only context replication but without cluster configuration management.

The implementation of this interface is set by the `ClusterBuilder`, by reading the "configurationManager" element in the axis2.xml

e.g. ``

Method Summary
`void` | `commit()` Second phase of the 2-phase commit protocol.
`void` | `exceptionOccurred(Throwable throwable)` To notify other nodes that an Exception occurred, during the processing of a `NodeManagementCommand`
`void` | `prepare()` First phase of the 2-phase commit protocol.
`void` | `rollback()` Rollback whatever was done
`void` | `sendMessage(NodeManagementCommand command)` Execute a NodeManagementCommand
`void` | `setConfigurationContext(ConfigurationContext configurationContext)` Set the system's configuration context.

Methods inherited from interface org.apache.axis2.description.ParameterInclude
`addParameter, deserializeParameters, getParameter, getParameters, isParameterLocked, removeParameter`

Method Detail

### prepare

    void prepare()
                 throws ClusteringFault

  First phase of the 2-phase commit protocol. Notifies a node that it needs to prepare to switch to a new configuration.

  Throws:
    `ClusteringFault` - If an error occurs while preparing to commit

### rollback

    void rollback()
                  throws ClusteringFault

  Rollback whatever was done

  Throws:
    `ClusteringFault` - If an error occurs while rolling back a cluster configuration transaction

### commit

    void commit()
                throws ClusteringFault

  Second phase of the 2-phase commit protocol. Notifies a node that it needs to switch to a new configuration.

  Throws:
    `ClusteringFault` - If an error occurs while committing a cluster configuration transaction

### exceptionOccurred

    void exceptionOccurred(Throwable throwable)
                           throws ClusteringFault

  To notify other nodes that an Exception occurred, during the processing of a `NodeManagementCommand`

  Parameters:
    `throwable` - The throwable which has to be propogated to other nodes
  Throws:
    `ClusteringFault` - If an error occurs while processing the exception message

### setConfigurationContext

    void setConfigurationContext(ConfigurationContext configurationContext)

  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

  Parameters:
    `configurationContext` - The configuration context

### sendMessage

    void sendMessage(NodeManagementCommand command)
                     throws ClusteringFault

  Execute a NodeManagementCommand

  Parameters:
    `command` - The command to be executed
  Throws:
    `ClusteringFault` - If an error occurs while sending the message

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.