Go to the documentation of this file.00001 #ifndef baciRecovery_h
00002 #define baciRecovery_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00034 #ifndef __cplusplus
00035 #error This is a C++ include file and cannot be used from plain C
00036 #endif
00037
00038 #include <acsutil.h>
00039 #include <baciExport.h>
00040
00041 #include <recoveryStore.h>
00042 #include <baciRecoverableObject.h>
00043
00044 #include <ace/SString.h>
00045 #include <vector>
00046
00047 namespace baci {
00048
00052 #define BACI_RECOVERY_FILE_NAME "baci_recovery"
00053
00057 #define MAX_IOR_LENGTH 800
00058
00062 #define MAX_NAME_LENGTH 50
00063
00077 class baci_EXPORT BACIRecoveryManager {
00078
00079 public:
00080
00084 BACIRecoveryManager();
00085
00089 ~BACIRecoveryManager();
00090
00095 static void loadRecovery(bool load);
00096
00101 static void enableRecovery(bool enable);
00102
00107 static void activatorName(const char * activatorName);
00108
00113 static BACIRecoveryManager* getInstance(void);
00114
00118 static void destroyInstance();
00119
00124 void addRecoverableObject(RecoverableObject *object);
00125
00130 void updateRecoverableObject(RecoverableObject *object);
00131
00136 void removeRecoverableObject(RecoverableObject *object);
00137
00142 ACE_CString_Vector getObjectsStartingWith(const char* namePrefix);
00143
00148 const char* getObjectState(const char* name);
00149
00155 char* generateObjectName(const char* namePrefix);
00156
00157 private:
00158
00163 recovery::RecoveryStore* store_mp;
00164
00168 static BACIRecoveryManager* instance_mp;
00169
00173 static bool load_m;
00174
00178 static bool enabled_m;
00179
00183 static const char * activatorName_mp;
00184
00188 void operator=(const BACIRecoveryManager&);
00189
00190
00194 BACIRecoveryManager(const BACIRecoveryManager&);
00195 };
00196
00197 };
00198
00199 #endif
00200
00201
00202
00203
00204
00205