#include <recoveryStore.h>
Public Types | |
typedef ACE_Hash_Map_Manager< ACE_CString, ACE_CString, ACE_Thread_Mutex > | STORE_HASH_MAP |
typedef ACE_Hash_Map_Iterator< ACE_CString, ACE_CString, ACE_Thread_Mutex > | STORE_HASH_MAP_ITER |
typedef ACE_Hash_Map_Entry< ACE_CString, ACE_CString > | STORE_HASH_MAP_ENTRY |
Public Member Functions | |
RecoveryStore (const ACE_CString &file_name, bool load=true, ACE_UINT32 max_size=0) | |
~RecoveryStore (void) | |
int | open (void) |
int | close (void) |
ACE_UINT32 | get_max_size (void) |
void | set_max_size (ACE_UINT32 size) |
ACE_UINT32 | get_current_size (void) |
ACE_UINT32 | get_n_records (void) |
int | log (const ACE_CString &id, const ACE_CString &data, bool bsave=true) |
int | exists (const ACE_CString &id) |
int | retrieve (const ACE_CString &id, ACE_CString &data) |
int | update (const ACE_CString &id, const ACE_CString &data, bool bsave=true) |
int | remove (const ACE_CString &id, bool bsave=true) |
STORE_HASH_MAP_ITER | get_iterator (void) |
int | save (void) |
int | load (void) |
int | unlink (void) |
Protected Attributes | |
RecoveryStore::STORE_HASH_MAP | rec_hash_ |
ACE_CString | file_name_ |
ACE_UINT32 | max_size_ |
ACE_UINT32 | current_size_ |
ACE_UINT32 | num_records_ |
ACE_Recursive_Thread_Mutex | mutex_ |
|
|
|
|
|
|
|
Constructor
|
|
Destructor |
|
Finalization method
|
|
Checks if recordwith key id is already mapped
|
|
Gets the current size (in bytes) of the store (id+data).
|
|
Get iterator of the store
|
|
Get the current set value of the max size of the store.
|
|
Get the number of records in the store right now.
|
|
Load records from the recovery file to the store
|
|
Insert rec into storage
|
|
Initialization method
|
|
Remove record data with the given id from the storage
|
|
Set data to the record data with the given id
|
|
Save records from the store to the recovery file
|
|
Set the max size of the store; size == 0 means infinite.
|
|
Remove recovery store file
|
|
Update data in the storage to the record with the given id
|
|
The current size (in bytes) of the store |
|
Recovery store file name |
|
The maximum size of the store. |
|
Thread mutex for thread-safe code |
|
The current number of records in the store |
|
The ACE implementation of hash map (ACE_Hash_Map_Manager) |