Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.FailureRecovery
Class FailureRecoveryManager

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.BasicObjects.AocsObject
              |
              +--RtjAocsFramework.FailureRecovery.FailureRecoveryManager
All Implemented Interfaces:
ActiveObject, Configurable, Resettable, Telemeterable

public class FailureRecoveryManager
extends AocsObject
implements ActiveObject

This class encapsulates a failure recovery manager. The failure recovery manager is the active component that is responsible for processing the events in the failure event repository and responding to them with appropriate failure recovery strategies.

The failure recovery manager only sees recovery strategies. Failure recovery actions are, where required, managed and implemented by the recovery strategies.

The failure recovery manager obtains the failure recovery strategy appropriate to current operating conditions from a failure recovery mode manager.

The failure recovery manager is essentially based on the chain of responsibility design pattern although it can also be seen as an instance of the manager meta-pattern where the list of functionality implementers only contains one element. In the classical version of the chain of responsibility pattern, the client's request (in this case, the request to perform a recovery) is passed along the chain of handlers (the recovery strategies) until one is found who is able to handle it. Each request is intended to be handled by only one handler. In the application of the pattern to failure recovery, however, a recovery strategy when it receives a recovery requests performs the following actions: (1) it handles the recovery request, and (2) it checks whether the recovery request should be passed on to the next recovery strategy or whether recovery processing should terminate. The recovery strategies are therefore executed in sequence but every recovery strategy has the chance to interrupt the chain. This incidentally means that the order in which the recovery strategies are linked in the list is important.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
The Failure Recovery Framelet Document., FailureRecoveryModeManager, RecoveryStrategy

Field Summary
 
Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM
 
Constructor Summary
FailureRecoveryManager()
           
 
Method Summary
 FailureRecoveryModeManager getFailureRecoveryModeManager()
           
 int getTelemetryImageLength()
          Return the length (in bits) of the telemetry image of the object.
 boolean initialize()
          Initialize an active object before it is scheduled.
 boolean isConfigured()
          Return false if some configuration data are missing.
 void resetConfiguration()
          Unload the failure recovery mode manager.
 void runOneCycle(int deadline)
          Perform all actions associated to the current cycle.
 void setFailureRecoveryModeManager(FailureRecoveryModeManager m)
           
 boolean terminate()
          Perfrom any shutdown actions before an active is de-scheduled.
 void writeToTelemetry(TelemetryStream tmStream)
          Direct the object to write its own state to the telemetry stream.
 
Methods inherited from class RtjAocsFramework.BasicObjects.AocsObject
addConfigurationListener, addFailureListener, finalize, getAocsClock, getConfigurationListenerList, getCycle, getDestructionRecoveryAction, getFailureListenerList, getSystemManager, getTelemetryFormat, getTime, removeConfigurationListener, removeFailureListener, reportConfigurationEvent, reportFailure, reset, resetStaticConfiguration, setAocsClock, setDestructionRecoveryAction, setMaxNumberOfConfigurationListeners, setMaxNumberOfFailureListeners, setSystemManager, setTelemetryFormat
 
Methods inherited from class RtjAocsFramework.BasicObjects.RootObject
getClassId, getInstanceId, setClassId
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailureRecoveryManager

public FailureRecoveryManager()
Method Detail

runOneCycle

public void runOneCycle(int deadline)
Description copied from interface: ActiveObject
Perform all actions associated to the current cycle.

Specified by:
runOneCycle in interface ActiveObject
Parameters:
deadline - deadline by which the object must have returned. This parameter allows implementation of cooperative scheduling.

resetConfiguration

public void resetConfiguration()
Unload the failure recovery mode manager.

Specified by:
resetConfiguration in interface Configurable
Overrides:
resetConfiguration in class AocsObject

isConfigured

public boolean isConfigured()
Description copied from interface: Configurable
Return false if some configuration data are missing.

Typically, a false value indicates that a plug-in component is missing or that the object has not been initialized. This is a negative check only: a return value of true cannot guarantee that the object is correctly configured.

Calls to resetConfiguration on an object A are normally not propagated objects of type AocsObject that are contained or otherwise aggregated to A. The rationale for this policy is that all objects of type AocsObject implement interface configurable and therefore their configuration status should be checked externally (probably through the configuration check service of the system manager).

Specified by:
isConfigured in interface Configurable
Overrides:
isConfigured in class AocsObject

initialize

public boolean initialize()
Description copied from interface: ActiveObject
Initialize an active object before it is scheduled.

Specified by:
initialize in interface ActiveObject
Returns:
true if initialization was successful.

terminate

public boolean terminate()
Description copied from interface: ActiveObject
Perfrom any shutdown actions before an active is de-scheduled.

Specified by:
terminate in interface ActiveObject
Returns:
true if shutdown was successful.

setFailureRecoveryModeManager

public void setFailureRecoveryModeManager(FailureRecoveryModeManager m)

getFailureRecoveryModeManager

public FailureRecoveryModeManager getFailureRecoveryModeManager()

writeToTelemetry

public void writeToTelemetry(TelemetryStream tmStream)
Description copied from interface: Telemeterable
Direct the object to write its own state to the telemetry stream.

Specified by:
writeToTelemetry in interface Telemeterable
Overrides:
writeToTelemetry in class AocsObject

getTelemetryImageLength

public int getTelemetryImageLength()
Description copied from interface: Telemeterable
Return the length (in bits) of the telemetry image of the object. This method is useful to verify that the quantity of data generated by a given object is compatible with the capacity of the telemetry channel.

Specified by:
getTelemetryImageLength in interface Telemeterable
Overrides:
getTelemetryImageLength in class AocsObject

Real-Time Java AOCS Framework v1.0 API Specification

Real-Time Java AOCS Framework project home page

Automatic Control Laboratory, ETH Zuerich
Physikstrasse 3
CH-8092 Zuerich, Switzerland