Storage Engine API
mongo::JournalListener Class Referenceabstract

This class allows for the storageEngine to alert the rest of the system about journaled write progress. More...

#include <journal_listener.h>

Inheritance diagram for mongo::JournalListener:
mongo::NoOpJournalListener

Detailed Description

This class allows for the storageEngine to alert the rest of the system about journaled write progress.

It has two methods. The first, getToken(), returns a token representing the current progress applied to the node. It should be called just prior to making writes durable (usually, syncing a journal entry to disk).

The second method, onDurable(), takes this token as an argument and relays to the rest of the system that writes through that point have been journaled. All implementations must be prepared to receive default-constructed Tokens generated by NoOpJournalListener, in case they are activated while a journal commit is in progress.

Public Types

using Token = repl::OpTime
 

Public Member Functions

virtual ~JournalListener ()=default
 
virtual Token getToken ()=0
 
virtual void onDurable (const Token &token)=0
 

Member Typedef Documentation

◆ Token

using mongo::JournalListener::Token = repl::OpTime

Constructor & Destructor Documentation

◆ ~JournalListener()

virtual mongo::JournalListener::~JournalListener ( )
virtualdefault

Member Function Documentation

◆ getToken()

virtual Token mongo::JournalListener::getToken ( )
pure virtual

Implemented in mongo::NoOpJournalListener.

◆ onDurable()

virtual void mongo::JournalListener::onDurable ( const Token token)
pure virtual

Implemented in mongo::NoOpJournalListener.


The documentation for this class was generated from the following file: