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 activatorName(const char * activatorName);
00102
00107 static BACIRecoveryManager* getInstance(void);
00108
00112 static void destroyInstance();
00113
00118 void addRecoverableObject(RecoverableObject *object);
00119
00124 void updateRecoverableObject(RecoverableObject *object);
00125
00130 void removeRecoverableObject(RecoverableObject *object);
00131
00136 ACE_CString_Vector getObjectsStartingWith(const char* namePrefix);
00137
00142 const char* getObjectState(const char* name);
00143
00149 char* generateObjectName(const char* namePrefix);
00150
00151 private:
00152
00157 recovery::RecoveryStore* store_mp;
00158
00162 static BACIRecoveryManager* instance_mp;
00163
00167 static bool load_m;
00168
00172 static const char * activatorName_mp;
00173
00177 void operator=(const BACIRecoveryManager&);
00178
00179
00183 BACIRecoveryManager(const BACIRecoveryManager&);
00184 };
00185
00186 };
00187
00188 #endif
00189
00190
00191
00192
00193
00194