#include <SIPDBManager.h>
This singleton ensures that there is only one named instance of fastDB running per process. This instance will have all the tables stored in it
Public Member Functions | |
| virtual | ~SIPDBManager () |
| Virtual Destructor. | |
| void | getAllTableProcesses (ResultSet &rResultSet) const |
| dumps the IMDB meta table info | |
| OsStatus | getProcessCount (int &rProcessCount) const |
| Number of Processes attached to tables (Processes * Tables). | |
| dbDatabase * | getDatabase (const UtlString &tablename) const |
| Registerd the database and pid, opens the DB if necessary and returns it. | |
| void | removeDatabase (const UtlString &tablename) const |
| unregisters the database from the IMDB and calls close to decrement the user count etc. | |
| int | getNumDatabaseProcesses (const UtlString &tablename) const |
| counts the number of processes attached to the DB | |
| OsStatus | getDatabaseInfo (UtlString &rDatabaseInfo) const |
| void | updateDatabaseInfo (const UtlString &tablename, const int &checksum) const |
| After loading an IMDB update its checksum information. | |
| void | setDatabaseChangedFlag (const UtlString &tablename, bool changed) const |
| Sets a change flag for the table indicating that there was an insert/update to it. | |
| bool | getDatabaseChangedFlag (const UtlString &tablename) const |
| determines whether the database has changed or not | |
| OsStatus | pingDatabase (const int &rTransactionLockSecs=0, const UtlBoolean &rTestWriteLock=FALSE) const |
| method to ping the data store and sleeps for timeoutSecs in the transaction | |
| OsStatus | preloadAllDatabase () const |
| preload all database tables | |
| OsStatus | preloadDatabaseTable (const UtlString &tablename) const |
| preload database table by name | |
| OsStatus | releaseAllDatabase () const |
| release all database tables | |
Static Public Member Functions | |
| static SIPDBManager * | getInstance () |
| Singleton Accessor. | |
| static void | getFieldValue (const unsigned char *base, const dbFieldDescriptor *fd, UtlString &textValue) |
| Helper Method for all IMDB tables. | |
| static OsStatus | getAttributeValue (const TiXmlNode &node, const UtlString &key, UtlString &value) |
| Helper Method for all IMDB tables. | |
Protected Member Functions | |
| dbDatabase * | openDatabase () const |
| Registerd the database and pid, opens the DB if necessary and returns it. | |
| SIPDBManager () | |
| void | setFastdbTempDir () |
| Override the default fastdb tmp dir. | |
Protected Attributes | |
| UtlString | m_absWorkingDirectory |
| UtlString | m_absConfigDirectory |
| UtlString | m_FastDbTmpDirPath |
Static Protected Attributes | |
| static SIPDBManager * | spInstance = NULL |
| static OsMutex | sLockMutex |
| static dbDatabase * | spFastDB = NULL |
| ~SIPDBManager | ( | ) | [virtual] |
Virtual Destructor.
| SIPDBManager | ( | ) | [protected] |
| SIPDBManager * getInstance | ( | ) | [static] |
Singleton Accessor.
| void getAllTableProcesses | ( | ResultSet & | rResultSet | ) | const |
dumps the IMDB meta table info
| OsStatus getProcessCount | ( | int & | rProcessCount | ) | const |
Number of Processes attached to tables (Processes * Tables).
| dbDatabase * getDatabase | ( | const UtlString & | tablename | ) | const |
Registerd the database and pid, opens the DB if necessary and returns it.
| void removeDatabase | ( | const UtlString & | tablename | ) | const |
unregisters the database from the IMDB and calls close to decrement the user count etc.
| int getNumDatabaseProcesses | ( | const UtlString & | tablename | ) | const |
counts the number of processes attached to the DB
| void updateDatabaseInfo | ( | const UtlString & | tablename, | |
| const int & | checksum | |||
| ) | const |
After loading an IMDB update its checksum information.
| void setDatabaseChangedFlag | ( | const UtlString & | tablename, | |
| bool | changed | |||
| ) | const |
Sets a change flag for the table indicating that there was an insert/update to it.
| bool getDatabaseChangedFlag | ( | const UtlString & | tablename | ) | const |
determines whether the database has changed or not
| OsStatus pingDatabase | ( | const int & | rTransactionLockSecs = 0, |
|
| const UtlBoolean & | rTestWriteLock = FALSE | |||
| ) | const |
method to ping the data store and sleeps for timeoutSecs in the transaction
| void getFieldValue | ( | const unsigned char * | base, | |
| const dbFieldDescriptor * | fd, | |||
| UtlString & | textValue | |||
| ) | [static] |
Helper Method for all IMDB tables.
| OsStatus getAttributeValue | ( | const TiXmlNode & | node, | |
| const UtlString & | key, | |||
| UtlString & | value | |||
| ) | [static] |
Helper Method for all IMDB tables.
| OsStatus preloadAllDatabase | ( | ) | const |
preload all database tables
| OsStatus releaseAllDatabase | ( | ) | const |
release all database tables
| dbDatabase * openDatabase | ( | ) | const [protected] |
Registerd the database and pid, opens the DB if necessary and returns it.
| void setFastdbTempDir | ( | ) | [protected] |
Override the default fastdb tmp dir.
SIPDBManager * spInstance = NULL [static, protected] |
OsMutex sLockMutex [static, protected] |
dbDatabase * spFastDB = NULL [static, protected] |
UtlString m_absWorkingDirectory [protected] |
UtlString m_absConfigDirectory [protected] |
UtlString m_FastDbTmpDirPath [protected] |