34 #include "mongo/base/disallow_copying.h" 40 class OperationContext;
58 virtual void createdFile(
const std::string& filename,
unsigned long long len) = 0;
66 virtual void declareWriteIntents(
const std::vector<std::pair<void*, unsigned>>& intents) = 0;
139 friend void startup(ClockSource* cs, int64_t serverStartMs);
149 void startup(ClockSource* cs, int64_t serverStartMs);
MONGO_DISALLOW_COPYING(DurableInterface)
void setJournalListener(JournalListener *jl)
Definition: dur.cpp:906
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
virtual void declareWriteIntents(const std::vector< std::pair< void *, unsigned >> &intents)=0
JournalListener * getJournalListener()
Definition: dur.cpp:911
const unsigned UncommittedBytesLimit
Definition: dur.h:45
DurableInterface()
Definition: dur.cpp:512
virtual void commitAndStopDurThread(OperationContext *opCtx)=0
Invoked at clean shutdown time.
virtual void closingFileNotification()=0
Called when a DurableMappedFile is closing.
This class allows for the storageEngine to alert the rest of the system about journaled write progres...
Definition: journal_listener.h:48
friend void startup(ClockSource *cs, int64_t serverStartMs)
Invoked at server startup.
Definition: dur.cpp:880
virtual bool waitUntilDurable()=0
Wait for acknowledgement of the next group commit.
virtual ~DurableInterface()
Definition: dur.cpp:514
virtual bool commitIfNeeded()=0
Commit if enough bytes have been modified.
virtual void syncDataAndTruncateJournal(OperationContext *opCtx)=0
Commits pending changes, flushes all changes to main data files, then removes the journal...
virtual void createdFile(const std::string &filename, unsigned long long len)=0
Declare that a file has been created.
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80
static DurableInterface * _impl
Definition: dur.h:141
static DurableInterface & getDur()
Definition: dur.h:131
virtual bool isDurable() const =0
virtual bool commitNow(OperationContext *opCtx)=0
Commit immediately.