|
Tkrzw
|
Interface of update logger. More...
#include <tkrzw_dbm.h>
Public Member Functions | |
| virtual | ~UpdateLogger ()=default |
| Destructor. More... | |
| virtual Status | WriteSet (std::string_view key, std::string_view value)=0 |
| Writes a log for modifying an existing record or adding a new record. More... | |
| virtual Status | WriteRemove (std::string_view key)=0 |
| Writes a log for removing an existing record. More... | |
| virtual Status | WriteClear ()=0 |
| Writes a log for removing all records. More... | |
| virtual Status | Synchronize (bool hard) |
| Synchronizes the metadata and content to the file system. More... | |
Interface of update logger.
|
virtualdefault |
Destructor.
|
pure virtual |
Writes a log for modifying an existing record or adding a new record.
| key | The key of the record. |
| value | The new value of the record. |
This is called by the Set, Append, Increment methods etc and when the Process method returns a new record value.
Implemented in tkrzw::DBMUpdateLoggerMQ, tkrzw::DBMUpdateLoggerSecondShard, tkrzw::DBMUpdateLoggerDBM, and tkrzw::DBMUpdateLoggerStrDeque.
|
pure virtual |
Writes a log for removing an existing record.
| key | The key of the record. |
This is called by the Remove method and when the Process method returns REMOVE.
Implemented in tkrzw::DBMUpdateLoggerMQ, tkrzw::DBMUpdateLoggerSecondShard, tkrzw::DBMUpdateLoggerDBM, and tkrzw::DBMUpdateLoggerStrDeque.
|
pure virtual |
Writes a log for removing all records.
This is called by the Clear method.
Implemented in tkrzw::DBMUpdateLoggerMQ, tkrzw::DBMUpdateLoggerSecondShard, tkrzw::DBMUpdateLoggerDBM, and tkrzw::DBMUpdateLoggerStrDeque.
|
virtual |
Synchronizes the metadata and content to the file system.
| hard | True to do physical synchronization with the hardware or false to do only logical synchronization with the file system. |
This is called by the Synchronize method.
Reimplemented in tkrzw::DBMUpdateLoggerMQ, and tkrzw::DBMUpdateLoggerDBM.