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-16 13:27:16 -0400
commitbb9b4e27c8c31542af52d80f4c3751c435909d69 (patch)
treefd06e28b14d194b27cfbe4753572337bc9d91d40 /src/mongo/db/write_concern.h
parente89ad4970c81ce122867e6af70d09cd164052022 (diff)
downloadmongo-bb9b4e27c8c31542af52d80f4c3751c435909d69.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.