|
Real-Time Java AOCS Framework v1.0 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--RtjAocsFramework.BasicObjects.RootObject
|
+--RtjAocsFramework.BasicObjects.AocsObject
|
+--RtjAocsFramework.FailureRecovery.RecoveryStrategy
This is the base class for recovery strategies. A failure recovery strategy is a set of coordinated responses to the failure events in the failure event repository. Unlike recovery actions, that act on individual failure reports, recovery strategies can take into considerations several failure reports and can therefore offer a higher-level response to failures.
The key method in this class is doRecovery() that inspects the event repository and implements the appropriate failure recovery response. Its implementation thus encapsulates an application-specific response to a set of failure reports. It represents a framework hot-spot (recovery strategy hot-spot).
Failure strategies can be chained together. This allows several failure strategies to be implemented in sequence.
Recovery strategies can be enabled or disabled and the enable status can be changed dynamically.
Recovery strategies are responsible for creating recovery events and this class therefore maintains a list of listeners to recovery events and offer a method to fire recovery events.
Copyright: see the Copyright Notice.
FailureEvent,
FailureEventRepository,
RecoveryAction,
RecoveryEvent| Field Summary |
| Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable |
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM |
| Constructor Summary | |
RecoveryStrategy()
This component should not be used before having set the maximum number of listeners to recovery events and having loaded the failure event repository. |
|
| Method Summary | |
void |
addRecoveryListener(RecoveryListener l)
Initialization method to register listeners to recovry events. |
void |
doRecovery()
Calling this method will cause the recovery strategy to be executed. |
protected void |
fireModeEvent(short eventTypeId,
RecoveryAction action)
Fire a recovery event to all registered listeners. |
FailureEventRepository |
getFailureEventRepository()
Recovery strategies operate on a failure event repository. |
RecoveryStrategy |
getNextRecoveryStrategy()
Return the next recovery strategy. |
int |
getTelemetryImageLength()
Return the length (in bits) of the telemetry image of the object. |
boolean |
isConfigured()
Return false if some configuration data are missing. |
boolean |
isEnabled()
Return true if the recovery strategy is enabled, otherwise false. |
void |
removeRecoveryListener(RecoveryListener l)
Initialization method to unregister recovery event listeners. |
void |
reset()
Set the state of the recovery strategy to 'enabled'. |
void |
resetConfiguration()
Unload the next recovery strategy in the chain. |
void |
setEnabled(boolean enabledStatus)
Recovery strategies can be dynamically enabled and disabled. |
void |
setFailureEventRepository(FailureEventRepository r)
Recovery strategies operate on a failure event repository. |
void |
setMaxNumberOfRecoveryListeners(int n)
Initialization method to set the maximum number of listeners to recovery events. |
void |
setNextRecoveryStrategy(RecoveryStrategy r)
Recovery strategies can be linked in chains. |
void |
writeToTelemetry(TelemetryStream tmStream)
Direct the object to write its own state to the telemetry stream. |
| 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 |
public RecoveryStrategy()
| Method Detail |
public void setMaxNumberOfRecoveryListeners(int n)
public void doRecovery()
public void resetConfiguration()
resetConfiguration in interface ConfigurableresetConfiguration in class AocsObjectpublic boolean isConfigured()
ConfigurableTypically, 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).
isConfigured in interface ConfigurableisConfigured in class AocsObjectpublic void reset()
reset in interface Resettablereset in class AocsObjectpublic void setNextRecoveryStrategy(RecoveryStrategy r)
public RecoveryStrategy getNextRecoveryStrategy()
public void setFailureEventRepository(FailureEventRepository r)
public FailureEventRepository getFailureEventRepository()
public void setEnabled(boolean enabledStatus)
public boolean isEnabled()
public void writeToTelemetry(TelemetryStream tmStream)
Telemeterable
writeToTelemetry in interface TelemeterablewriteToTelemetry in class AocsObjectpublic int getTelemetryImageLength()
Telemeterable
getTelemetryImageLength in interface TelemeterablegetTelemetryImageLength in class AocsObjectpublic void addRecoveryListener(RecoveryListener l)
public void removeRecoveryListener(RecoveryListener l)
protected void fireModeEvent(short eventTypeId,
RecoveryAction action)
|
Real-Time Java AOCS Framework v1.0 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||