summaryrefslogtreecommitdiff
path: root/src/mongo/db/dur.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2013-11-28 00:21:23 -0500
committerEliot Horowitz <eliot@10gen.com>2013-12-03 21:24:55 -0500
commitff4308beb1716d245779effef81acdef7686cc2c (patch)
tree428629cfd2140072377d66738348944f3f5f8b92 /src/mongo/db/dur.h
parent4fa4012a60147450b8c201ebb90687596fe673d5 (diff)
downloadmongo-ff4308beb1716d245779effef81acdef7686cc2c.tar.gz
SERVER-11665: refactor waitForWriteConcern
new structs instead of BSONObj
Diffstat (limited to 'src/mongo/db/dur.h')
-rw-r--r--src/mongo/db/dur.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/dur.h b/src/mongo/db/dur.h
index 2ae50ef62d7..4731ce16091 100644
--- a/src/mongo/db/dur.h
+++ b/src/mongo/db/dur.h
@@ -169,6 +169,8 @@ namespace mongo {
*/
virtual void syncDataAndTruncateJournal() = 0;
+ virtual bool isDurable() const = 0;
+
static DurableInterface& getDur() { return *_impl; }
private:
@@ -202,6 +204,7 @@ namespace mongo {
bool commitIfNeeded(bool) { return false; }
bool aCommitIsNeeded() const { return false; }
void syncDataAndTruncateJournal() {}
+ bool isDurable() const { return false; }
};
class DurableImpl : public DurableInterface {
@@ -216,6 +219,7 @@ namespace mongo {
bool aCommitIsNeeded() const;
bool commitIfNeeded(bool);
void syncDataAndTruncateJournal();
+ bool isDurable() const { return true; }
};
} // namespace dur