![]() |
Storage Engine API
|
This class allows for the storageEngine to alert the rest of the system about journaled write progress. More...
#include <journal_listener.h>
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 |
using mongo::JournalListener::Token = repl::OpTime |
|
virtualdefault |
|
pure virtual |
Implemented in mongo::NoOpJournalListener.
Implemented in mongo::NoOpJournalListener.