#include <fio_PermDBinfoMgr.h>

Definition at line 44 of file fio_PermDBinfoMgr.h.
Public Member Functions | |
| void IVD_FILEIO_DECL_d | Init (fio_DataBaseID_t a_DataBaseID, ivd_Time32_t a_JourDate) |
| void | CheckValidation (fio_DataBaseID_t a_dbID) |
| bool | IsSynchonized () |
Public Attributes | |
| UInt16_t | recordStructVersion |
| UInt16_t | recordSize |
| fio_DataBaseID_t | DataBaseID |
| IVD system unique number. In case of FSC PartitionID is used. | |
| ivd_Time32_t | JourDate |
| Time of journal file creation. | |
| ivd_TransNumber_t | LastTransNumber |
| Which transaction is already committed. It's reset after archive. | |
| ivd_FileID_t | LastJourFileID |
| Journal file ID, used to know into which jourfile is last transaction commited. | |
| ivd_FilePosition_t | PostTransPosition |
| pointer to the end of last transaction commited | |
| ivd_FileID_t | LastSyncJourFileID |
| Last synchronization Journal file ID. | |
| ivd_FilePosition_t | LastSyncPosition |
| Last synchronization pointer into journal file. | |
| UInt32_t | ArchivedSyncJourFileID |
| Archived journal File ID. | |
| ivd_FilePosition_t | ArchivedSyncPosition |
| Archived Sync position. | |
| log_CLASSID_m | |
Friends | |
| IVD_FILEIO_DECL_d ostream & | operator<< (ostream &a_os, fio_permDBinfo_t &a_pdbi) |
| void fio_permDBinfo_t::Init | ( | fio_DataBaseID_t | a_DataBaseID, | |
| ivd_Time32_t | a_JourDate | |||
| ) |
Definition at line 60 of file fio_permDBinfoMgr.cpp.
References ArchivedSyncJourFileID, ArchivedSyncPosition, DataBaseID, fio_PERM_DB_INFO_STRUCT_VERSION_d, JourDate, LastJourFileID, LastSyncJourFileID, LastSyncPosition, LastTransNumber, log_FUNC_m, PostTransPosition, recordSize, and recordStructVersion.
Referenced by ClearPDBI(), and fio_PermDBinfoMgr::fio_PermDBinfoMgr().
00066 { 00067 log_FUNC_m(Init); 00068 00069 recordStructVersion = fio_PERM_DB_INFO_STRUCT_VERSION_d; 00070 recordSize = sizeof(fio_permDBinfo_t); 00071 DataBaseID = a_DataBaseID; 00072 JourDate = a_JourDate; 00073 LastTransNumber = 0; 00074 LastJourFileID = 0; 00075 PostTransPosition = 0; 00076 LastSyncJourFileID = 0; 00077 LastSyncPosition = 0; 00078 ArchivedSyncJourFileID = 0; 00079 ArchivedSyncPosition = 0; 00080 00081 00082 // LastTransNumber = a_LastTransNumber; 00083 00084 }

| void fio_permDBinfo_t::CheckValidation | ( | fio_DataBaseID_t | a_dbID | ) |
Definition at line 89 of file fio_permDBinfoMgr.cpp.
References DataBaseID, dbg_LOW, fio_PERM_DB_INFO_STRUCT_VERSION_d, ie_PERM_DB_INFO_HEADER_INV, ivd_Error, log_DBG_m, log_FUNC_m, recordSize, and recordStructVersion.
Referenced by fio_PermDBinfoMgr::fio_PermDBinfoMgr().
00089 { 00090 log_FUNC_m(CheckValidation); 00091 00092 if (recordStructVersion != fio_PERM_DB_INFO_STRUCT_VERSION_d) { 00093 throw ivd_Error(ie_PERM_DB_INFO_HEADER_INV, 00094 "Record structure version mismatch.", true); 00095 } 00096 00097 if (recordSize != sizeof(fio_permDBinfo_t) ) { 00098 throw ivd_Error(ie_PERM_DB_INFO_HEADER_INV, 00099 "Record size mismatch.", true); 00100 } 00101 00102 if (!(DataBaseID == a_dbID)) { 00103 log_DBG_m(dbg_LOW,"DataBaseID:" << DataBaseID << 00104 " a_dbID:" << a_dbID); 00105 00106 throw ivd_Error(ie_PERM_DB_INFO_HEADER_INV, 00107 "Database ID mismatch.", true); 00108 } 00109 }

| bool fio_permDBinfo_t::IsSynchonized | ( | ) | [inline] |
Definition at line 53 of file fio_PermDBinfoMgr.h.
References LastJourFileID, LastSyncJourFileID, LastSyncPosition, and PostTransPosition.
00053 { 00054 return ( (LastSyncPosition == PostTransPosition) 00055 && (LastSyncJourFileID == LastJourFileID)); 00056 };
| IVD_FILEIO_DECL_d ostream& operator<< | ( | ostream & | a_os, | |
| fio_permDBinfo_t & | a_pdbi | |||
| ) | [friend] |
Definition at line 218 of file fio_permDBinfoMgr.cpp.
00218 { 00219 cmn_Time tjd(a_pdbi.JourDate, 0); 00220 00221 a_os << "***** Permanent Database Information ***************" << endl; 00222 a_os << "Structure version = " << a_pdbi.recordStructVersion << endl; 00223 a_os << "Record size = " << a_pdbi.recordSize << endl; 00224 a_os << "Database ID = " << a_pdbi.DataBaseID << endl; 00225 a_os << "Journal date = " << tjd.Time2YMDhms() << endl; 00226 a_os << "Num. of last trans. in DB = " << a_pdbi.LastTransNumber << endl; 00227 a_os << "Last journal file ID = 0x" << hex << a_pdbi.LastJourFileID << dec << endl; 00228 a_os << "Pos. after last trans in DB= " << a_pdbi.PostTransPosition << endl; 00229 a_os << "Last jou fileID after sync = 0x" << hex << a_pdbi.LastSyncJourFileID << dec << endl; 00230 a_os << "Pos. where last sync occure= " << a_pdbi.LastSyncPosition << endl; 00231 a_os << "Archive sync jour file ID = 0x" << hex << a_pdbi.ArchivedSyncJourFileID << dec << endl; 00232 a_os << "Archive sync position = " << a_pdbi.ArchivedSyncPosition << endl; 00233 a_os << "***** End Of Permanent Database Information ********" << endl; 00234 return a_os; 00235 }
Definition at line 56 of file fio_PermDBinfoMgr.h.
Referenced by CheckValidation(), Init(), main(), and operator<<().
Definition at line 59 of file fio_PermDBinfoMgr.h.
Referenced by CheckValidation(), Init(), main(), and operator<<().
IVD system unique number. In case of FSC PartitionID is used.
Definition at line 61 of file fio_PermDBinfoMgr.h.
Referenced by CheckValidation(), ClearPDBI(), fio_PermDBinfoMgr::GetDataBaseID(), Init(), fio_PermJourInfo_t::Init(), main(), and operator<<().
Time of journal file creation.
Definition at line 64 of file fio_PermDBinfoMgr.h.
Referenced by fio_PermDBinfoMgr::GetJourDate(), Init(), fio_PermJourInfo_t::Init(), main(), operator<<(), and fio_PermDBinfoMgr::SetJourDate().
Which transaction is already committed. It's reset after archive.
Definition at line 67 of file fio_PermDBinfoMgr.h.
Referenced by fio_PermDBinfoMgr::GetLastTransNumber(), Init(), main(), operator<<(), and fio_PermDBinfoMgr::SetLastTransaction().
Journal file ID, used to know into which jourfile is last transaction commited.
Definition at line 70 of file fio_PermDBinfoMgr.h.
Referenced by fio_PermDBinfoMgr::GetLastJourFileID(), Init(), IsSynchonized(), main(), operator<<(), and fio_PermDBinfoMgr::SetLastTransaction().
pointer to the end of last transaction commited
Definition at line 73 of file fio_PermDBinfoMgr.h.
Referenced by fio_PermDBinfoMgr::GetPostTransPosition(), Init(), IsSynchonized(), main(), operator<<(), and fio_PermDBinfoMgr::SetLastTransaction().
Last synchronization Journal file ID.
The last sync info is useful for startup while UV buffers need to be created. There is no UV in buffer at sync time. Thus, traversing journal file could be startet at lastsync pointers.
Definition at line 80 of file fio_PermDBinfoMgr.h.
Referenced by fio_PermDBinfoMgr::GetLastSyncJourFileID(), Init(), IsSynchonized(), main(), operator<<(), and fio_PermDBinfoMgr::SetLastSyncPosition().
Last synchronization pointer into journal file.
Definition at line 83 of file fio_PermDBinfoMgr.h.
Referenced by fio_PermDBinfoMgr::GetLastSyncPosition(), Init(), IsSynchonized(), main(), operator<<(), and fio_PermDBinfoMgr::SetLastSyncPosition().
Archived journal File ID.
Definition at line 87 of file fio_PermDBinfoMgr.h.
Referenced by fio_PermDBinfoMgr::GetArhivedSyncJourFileID(), Init(), fio_PermJourInfo_t::Init(), main(), operator<<(), and fio_PermDBinfoMgr::SetLastSyncPosition().
Archived Sync position.
Definition at line 90 of file fio_PermDBinfoMgr.h.
Referenced by Init(), fio_PermJourInfo_t::Init(), main(), operator<<(), and fio_PermDBinfoMgr::SetLastSyncPosition().
Definition at line 92 of file fio_PermDBinfoMgr.h.
1.5.6