org.apache.axis2.clustering.configuration
Class ConfigurationClusteringCommand

java.lang.Object
  extended by org.apache.axis2.clustering.ClusteringCommand
      extended by org.apache.axis2.clustering.configuration.ConfigurationClusteringCommand
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ApplyServicePolicyCommand, CommitCommand, ExceptionCommand, LoadServiceGroupsCommand, PrepareCommand, ReloadConfigurationCommand, RollbackCommand, UnloadServiceGroupsCommand

public abstract class ConfigurationClusteringCommand
extends ClusteringCommand

This class represents the 2-phase commit protocol, where an event is processed, the system is prepared to switch to a new configuration based on the processed event, and finally commits the new configuration (i.e. the system switches to the new configuration). As can be seen, this is a 3-step process.

See Also:
Serialized Form

Field Summary
static int APPLY_SERVICE_POLICY
           
static int COMMIT
           
static int EXCEPTION
           
static int LOAD_SERVICE_GROUPS
           
static int PREPARE
           
static int RELOAD_CONFIGURATION
           
static int ROLLBACK
           
static int UNLOAD_SERVICE_GROUPS
           
 
Constructor Summary
ConfigurationClusteringCommand()
           
 
Method Summary
abstract  void commit(ConfigurationContext configContext)
          Commit the new configuration.
abstract  int getCommandType()
          Get the command type
abstract  void prepare(ConfigurationContext configContext)
          Prepare to switch to the new configuration
abstract  void process(ConfigurationContext configContext)
          Process the event.
abstract  void rollback(ConfigurationContext configContext)
          Rollback any changes carried out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RELOAD_CONFIGURATION

public static final int RELOAD_CONFIGURATION
See Also:
Constant Field Values

LOAD_SERVICE_GROUPS

public static final int LOAD_SERVICE_GROUPS
See Also:
Constant Field Values

UNLOAD_SERVICE_GROUPS

public static final int UNLOAD_SERVICE_GROUPS
See Also:
Constant Field Values

APPLY_SERVICE_POLICY

public static final int APPLY_SERVICE_POLICY
See Also:
Constant Field Values

PREPARE

public static final int PREPARE
See Also:
Constant Field Values

COMMIT

public static final int COMMIT
See Also:
Constant Field Values

EXCEPTION

public static final int EXCEPTION
See Also:
Constant Field Values

ROLLBACK

public static final int ROLLBACK
See Also:
Constant Field Values
Constructor Detail

ConfigurationClusteringCommand

public ConfigurationClusteringCommand()
Method Detail

getCommandType

public abstract int getCommandType()
Get the command type

Returns:
The command type

process

public abstract void process(ConfigurationContext configContext)
                      throws java.lang.Exception
Process the event. The implementer of this interface will need to cache the outcome of this processing.

Parameters:
configContext -
Throws:
java.lang.Exception

prepare

public abstract void prepare(ConfigurationContext configContext)
Prepare to switch to the new configuration

Parameters:
configContext -

commit

public abstract void commit(ConfigurationContext configContext)
                     throws java.lang.Exception
Commit the new configuration. i.e. switch the system to the new configuration

Parameters:
configContext -
Throws:
java.lang.Exception

rollback

public abstract void rollback(ConfigurationContext configContext)
                       throws java.lang.Exception
Rollback any changes carried out

Parameters:
configContext -
Throws:
java.lang.Exception


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