Previous Table of Contents Next


23.5.4 Checkpointable and Updateable Interfaces


   An application object inherits the Checkpointable interface, which provides get_state() and set_state() operations, to enable the Logging and Recovery Mechanisms to record and restore its state. The Logging Mechanism obtains the value of the CheckpointInterval from the Property Manager, which determines the interval between successive invocations of the get_state() operation.

   An application object may also inherit the Updateable interface, which provides get_update() and set_update() operations, to enable the Logging and Recovery Mechanisms to record and restore updates. An update is the set of changes in the state of an object since the most recent invocation of get_state() or get_update().

   The Logging Mechanism invokes the get_state() operation on a member of an object group to obtain its state. In addition, for the WARM_PASSIVE ReplicationStyle, the Logging Mechanism invokes the get_state() operation on the primary member to obtain the state needed to update the backup members in order to speed up the failover process in case the primary fails. The Recovery Mechanism invokes the set_state() operation on the new or recovering member of the object group, and on the backups for the WARM_PASSIVE ReplicationStyle.

   The Logging Mechanism invokes the get_update() operation on a member of an object group to obtain data that represents the change (delta) between the previous state and the current state. The “previous? state is the state at the moment of the most recent invocation of get_state() or get_update(). The state of the backup is typically updated using the most recent state plus the following updates. The Recovery Mechanism invokes the set_update() operation on the new or recovering member of the object group, and on the backups for the WARM_PASSIVE ReplicationStyle.

   module FT {typedef sequence<octet> State;

   exception NoStateAvailable {};exception InvalidState {};exception NoUpdateAvailable {};exception InvalidUpdate {}; get_update

   interface Checkpointable { State get_state() raises(NoStateAvailable);

   void set_state(in State s) raises(InvalidState); };

   interface Updateable : Checkpointable { State get_update() raises(NoUpdateAvailable);

   void set_update(in State s) raises(InvalidUpdate); }; };

   23.5.4.1 Identifiers

   typedef sequence<octet> State;

   The state or partial state (update) of an object.

   23.5.4.2 Exceptions 23.5.4.3 Operations

NoStateAvailable {}

InvalidState {};

NoUpdateAvailable {};

InvalidUpdate {};

This exception is thrown if the state of the object is not available.
This exception is thrown if the state being supplied to the object is not a valid state for the object. The Fault Tolerance Infrastructure then assumes that the object has failed.
This exception is thrown if an update for the object is not available.
This exception is thrown if the update being supplied to the object is not a valid update for the object. The Fault Tolerance Infrastructure then assumes that the object has failed.

   get_state

   This operation obtains the state of the application object on which it is invoked. The operation is invoked by the Logging Mechanism. The CheckpointInterval obtained from the Property Manager determines the interval between invocations of get_state().

   When the Logging Mechanism invokes get_state(), the application object returns the state. For each retrieval of a state, the Logging Mechanism invokes get_state() only once, and the state that is returned is the state at the time get_state() is invoked.

   State get_state()raises(NoStateAvailable);

   Return Value

   The state of the application object on which the operation is invoked.

   Raises

   NoStateAvailable if the state is not available.

   set_state

   This operation sets the state of the application object on which it is invoked. The operation is invoked by the Recovery Mechanism. When the Recovery Mechanism invokes set_state(), it transfers the state to the application object.

   void set_state(in State s)raises(InvalidState);

   Parameters


   Raises

   InvalidState if the parameter s is not a valid state. If the exception is raised, the Fault Tolerance Infrastructure assumes that the application object has failed.

   get_update

   This operation obtains an update from the application object on which it is invoked. The get_update() operation is invoked by the Logging Mechanism.

   When the Logging Mechanism invokes get_update(), the application object returns the update. For each retrieval of an update, the Logging Mechanism invokes get_update() only once, and the update that is returned is the update at the time get_update() is invoked.

   State get_update()raises(NoUpdateAvailable);

   Return Value

   An update for the application object on which the operation is invoked.

   Exception

   NoUpdateAvailable if an update is not available.

   23.5.4.4 set_update

   This method applies an update to the application object on which it is invoked. The operation is invoked by the Recovery Mechanism. When the Recovery Mechanism invokes set_update(), it transfers the update to the application object.

   void set_update(in State s)raises(InvalidUpdate);

   Parameters


   Exception

   InvalidUpdate if the parameter s is not a valid update.