|
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.FailureDetection.FailureDetectionManager
This class encapsulates a failure detection manager. The objective of the failure detection manager is to perform failure detection tests on individual components. A failure is declared when a failure detection test fails.
The general principle adopted in the framework is that the knowledge required to perform the failure detection test should be confined to the tested component. The task of the failure detection manager is simply to ask for the test to be performed, to record the results, and to make them available to other interested components. The actual test is performed by the tested component.
Two types of failure detection tests are foreseen: consistency checks and monitoring checks.
A consistency check test verifies that the internal state of the object is consistent. Objects that can perform a consistency check upon themselves implement the ConsistencyCheckable interface. The failure detection manager internally maintains a list of objects of type ConsistencyCheckable that must be subjected to a consistency check at every activation. At each activation, the detection manager cycles through the objects in its list and directs them to perform the consistency check upon themselves. If the consistency check fails, a failure is declared.
A monitoring check encapsulates a failure detection test based on verifying that the value of a property follows a pre-specified behaviour. Monitoring checks are encapsulated in objects of type MonitoringCheck. These objects package the property to be checked, the change type and the recovery action to be performed in case the change is found to have occurred. The implementation of the monitoring check part of failure detection is done by maintaining a list of monitoring check objects and passing each property value through the corresponding change object. When a change is detected, the fact is reported as a change event and as a failure.
The failure detection manager is based on the failure detection management design pattern to separate the management of failure detection tests from their implementations.
The failure detection manager can fire change events in response to the violation of monitoring checks.
Copyright: see the Copyright Notice.
ConsistencyCheckable,
MonitoringCheck,
ChangeEvent| Field Summary |
| Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable |
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM |
| Constructor Summary | |
FailureDetectionManager()
|
|
| Method Summary | |
void |
addChangeListener(ChangeListener l)
|
FailureDetectionModeManager |
getFailureDetectionModeManager()
|
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 |
removeChangeListener(ChangeListener l)
|
void |
resetConfiguration()
Unload the mode manager and the monitoring check and consistency checkable lists. |
void |
runOneCycle(int deadline)
Perform all actions associated to the current cycle. |
void |
setFailureDetectionModeManager(FailureDetectionModeManager tmm)
|
void |
setMaxNumberOfChangeListeners(int n)
Initialization method to set the maximum number of listeners to change events. |
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.RootObject |
getClassId, getInstanceId, setClassId |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FailureDetectionManager()
| Method Detail |
public void runOneCycle(int deadline)
ActiveObject
runOneCycle in interface ActiveObjectdeadline - deadline by which the object must have returned. This
parameter allows implementation of cooperative scheduling.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 addChangeListener(ChangeListener l)
public void removeChangeListener(ChangeListener l)
public void setMaxNumberOfChangeListeners(int n)
public void writeToTelemetry(TelemetryStream tmStream)
Telemeterable
writeToTelemetry in interface TelemeterablewriteToTelemetry in class AocsObjectpublic int getTelemetryImageLength()
Telemeterable
getTelemetryImageLength in interface TelemeterablegetTelemetryImageLength in class AocsObjectpublic void setFailureDetectionModeManager(FailureDetectionModeManager tmm)
public FailureDetectionModeManager getFailureDetectionModeManager()
public boolean initialize()
ActiveObject
initialize in interface ActiveObjectpublic boolean terminate()
ActiveObject
terminate in interface ActiveObject
|
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 | ||||||||||