diff options
Diffstat (limited to 'src/mongo/db/repl/read_after_optime_args.h')
-rw-r--r-- | src/mongo/db/repl/read_after_optime_args.h | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/src/mongo/db/repl/read_after_optime_args.h b/src/mongo/db/repl/read_after_optime_args.h index ee58dd3b9b2..04536ce8702 100644 --- a/src/mongo/db/repl/read_after_optime_args.h +++ b/src/mongo/db/repl/read_after_optime_args.h @@ -36,40 +36,38 @@ namespace mongo { - class BSONObj; +class BSONObj; namespace repl { - class ReadAfterOpTimeArgs { - public: +class ReadAfterOpTimeArgs { +public: + static const std::string kRootFieldName; + static const std::string kOpTimeFieldName; + static const std::string kOpTimestampFieldName; + static const std::string kOpTermFieldName; - static const std::string kRootFieldName; - static const std::string kOpTimeFieldName; - static const std::string kOpTimestampFieldName; - static const std::string kOpTermFieldName; + ReadAfterOpTimeArgs(); + explicit ReadAfterOpTimeArgs(OpTime opTime); - ReadAfterOpTimeArgs(); - explicit ReadAfterOpTimeArgs(OpTime opTime); + /** + * Format: + * { + * find: “coll”, + * filter: <Query Object>, + * $readConcern: { // optional + * afterOpTime: { ts: <timestamp>, term: <NumberLong> }, + * } + * } + */ + Status initialize(const BSONObj& cmdObj); - /** - * Format: - * { - * find: “coll”, - * filter: <Query Object>, - * $readConcern: { // optional - * afterOpTime: { ts: <timestamp>, term: <NumberLong> }, - * } - * } - */ - Status initialize(const BSONObj& cmdObj); + const OpTime& getOpTime() const; + const Milliseconds& getTimeout() const; - const OpTime& getOpTime() const; - const Milliseconds& getTimeout() const; +private: + OpTime _opTime; +}; - private: - - OpTime _opTime; - }; - -} // namespace repl -} // namespace mongo +} // namespace repl +} // namespace mongo |