Tkrzw
Public Member Functions | Public Attributes | List of all members
tkrzw::DBMUpdateLoggerSecondShard Class Referencefinal

Update logger adapter for the second shard and later. More...

#include <tkrzw_dbm_ulog.h>

Public Member Functions

 DBMUpdateLoggerSecondShard ()
 Default constructor. More...
 
 DBMUpdateLoggerSecondShard (DBM::UpdateLogger *ulog)
 Constructor. More...
 
void SetUpdateLogger (DBM::UpdateLogger *ulog)
 Set the update logger to do actual logging. More...
 
Status WriteSet (std::string_view key, std::string_view value) override
 Writes a log for modifying an existing record or adding a new record. More...
 
Status WriteRemove (std::string_view key) override
 Writes a log for removing an existing record. More...
 
Status WriteClear () override
 Writes a log for removing all records. More...
 
- Public Member Functions inherited from tkrzw::DBM::UpdateLogger
virtual ~UpdateLogger ()=default
 Destructor. More...
 
virtual Status Synchronize (bool hard)
 Synchronizes the metadata and content to the file system. More...
 

Public Attributes

DBM::UpdateLoggerulog_
 The internal update logger. More...
 

Detailed Description

Update logger adapter for the second shard and later.

Constructor & Destructor Documentation

◆ DBMUpdateLoggerSecondShard() [1/2]

tkrzw::DBMUpdateLoggerSecondShard::DBMUpdateLoggerSecondShard ( )

Default constructor.

◆ DBMUpdateLoggerSecondShard() [2/2]

tkrzw::DBMUpdateLoggerSecondShard::DBMUpdateLoggerSecondShard ( DBM::UpdateLogger ulog)
explicit

Constructor.

Parameters
ulogThe logger to do actual logging.

Member Function Documentation

◆ SetUpdateLogger()

void tkrzw::DBMUpdateLoggerSecondShard::SetUpdateLogger ( DBM::UpdateLogger ulog)

Set the update logger to do actual logging.

Parameters
ulogThe update logger to do actual logging.

◆ WriteSet()

Status tkrzw::DBMUpdateLoggerSecondShard::WriteSet ( std::string_view  key,
std::string_view  value 
)
overridevirtual

Writes a log for modifying an existing record or adding a new record.

Parameters
keyThe key of the record.
valueThe new value of the record.
Returns
The result status.

Implements tkrzw::DBM::UpdateLogger.

◆ WriteRemove()

Status tkrzw::DBMUpdateLoggerSecondShard::WriteRemove ( std::string_view  key)
overridevirtual

Writes a log for removing an existing record.

Parameters
keyThe key of the record.
Returns
The result status.

Implements tkrzw::DBM::UpdateLogger.

◆ WriteClear()

Status tkrzw::DBMUpdateLoggerSecondShard::WriteClear ( )
overridevirtual

Writes a log for removing all records.

Returns
The result status.

This does no operation.

Implements tkrzw::DBM::UpdateLogger.

Member Data Documentation

◆ ulog_

DBM::UpdateLogger* tkrzw::DBMUpdateLoggerSecondShard::ulog_

The internal update logger.