summaryrefslogtreecommitdiff
path: root/src/mongo/db/write_concern.h
diff options
context:
space:
mode:
authorDaniel Alabi <alabidan@gmail.com>2015-03-16 13:11:40 -0400
committerDaniel Alabi <alabidan@gmail.com>2015-03-17 11:57:00 -0400
commit21c4f06e356d42aa12442e3f6bca99e55266cd6d (patch)
tree7d54d8c7ef8c8e44ab4463c04c70df2b1a142365 /src/mongo/db/write_concern.h
parent196e937ddb5b7d4b2496c6fcb44b0d49d6a5a7c5 (diff)
downloadmongo-21c4f06e356d42aa12442e3f6bca99e55266cd6d.tar.gz
SERVER-6558 Add writeConcern option to findAndModify command
Diffstat (limited to 'src/mongo/db/write_concern.h')
-rw-r--r--src/mongo/db/write_concern.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mongo/db/write_concern.h b/src/mongo/db/write_concern.h
index 98d7893a2e1..19513e4f969 100644
--- a/src/mongo/db/write_concern.h
+++ b/src/mongo/db/write_concern.h
@@ -34,6 +34,23 @@
namespace mongo {
class OperationContext;
+ template <typename T> class StatusWith;
+
+ /**
+ * If "writeConcern" indicates a durable commit level,
+ * marks the RecoveryUnit associated with "txn" appropriately.
+ * Provides a hint to the storage engine that
+ * particular operations will be waiting for their changes to become durable.
+ */
+ void setupSynchronousCommit(const WriteConcernOptions& writeConcern,
+ OperationContext* txn);
+
+ /**
+ * Attempts to extract a writeConcern from cmdObj.
+ * Verifies that the writeConcern is of type Object (BSON type) and
+ * that the resulting writeConcern is valid for this particular host.
+ */
+ StatusWith<WriteConcernOptions> extractWriteConcern(const BSONObj& cmdObj);
/**
* Verifies that a WriteConcern is valid for this particular host.