DBM update logger to replicate updates in another DBM.
More...
#include <tkrzw_dbm_ulog.h>
DBM update logger to replicate updates in another DBM.
◆ DBMUpdateLoggerDBM()
tkrzw::DBMUpdateLoggerDBM::DBMUpdateLoggerDBM |
( |
DBM * |
dbm | ) |
|
|
explicit |
Constructor.
- Parameters
-
dbm | A DBM object to store logs in. The ownership is not taken. |
◆ WriteSet()
Status tkrzw::DBMUpdateLoggerDBM::WriteSet |
( |
std::string_view |
key, |
|
|
std::string_view |
value |
|
) |
| |
|
overridevirtual |
Writes a log for modifying an existing record or adding a new record.
- Parameters
-
key | The key of the record. |
value | The new value of the record. |
- Returns
- The result status.
Implements tkrzw::DBM::UpdateLogger.
◆ WriteRemove()
Status tkrzw::DBMUpdateLoggerDBM::WriteRemove |
( |
std::string_view |
key | ) |
|
|
overridevirtual |
Writes a log for removing an existing record.
- Parameters
-
key | The key of the record. |
- Returns
- The result status.
Implements tkrzw::DBM::UpdateLogger.
◆ WriteClear()
Status tkrzw::DBMUpdateLoggerDBM::WriteClear |
( |
| ) |
|
|
overridevirtual |
◆ Synchronize()
Status tkrzw::DBMUpdateLoggerDBM::Synchronize |
( |
bool |
hard | ) |
|
|
overridevirtual |
Synchronizes the metadata and content to the file system.
- Parameters
-
hard | True to do physical synchronization with the hardware or false to do only logical synchronization with the file system. |
- Returns
- The result status.
Reimplemented from tkrzw::DBM::UpdateLogger.