diff options
Diffstat (limited to 'src/mongo/db/repl/update_position_args.h')
-rw-r--r-- | src/mongo/db/repl/update_position_args.h | 77 |
1 files changed, 41 insertions, 36 deletions
diff --git a/src/mongo/db/repl/update_position_args.h b/src/mongo/db/repl/update_position_args.h index a3450163d56..ecaf9ec5d4e 100644 --- a/src/mongo/db/repl/update_position_args.h +++ b/src/mongo/db/repl/update_position_args.h @@ -35,49 +35,54 @@ namespace mongo { - class Status; +class Status; namespace repl { - /** - * Arguments to the handshake command. - */ - class UpdatePositionArgs { - public: - struct UpdateInfo { - UpdateInfo(const OID& anRid, const OpTime& aTs, long long aCfgver, long long aMemberId); +/** + * Arguments to the handshake command. + */ +class UpdatePositionArgs { +public: + struct UpdateInfo { + UpdateInfo(const OID& anRid, const OpTime& aTs, long long aCfgver, long long aMemberId); - OID rid; - OpTime ts; - long long cfgver; - long long memberId; - }; + OID rid; + OpTime ts; + long long cfgver; + long long memberId; + }; - typedef std::vector<UpdateInfo>::const_iterator UpdateIterator; + typedef std::vector<UpdateInfo>::const_iterator UpdateIterator; - /** - * Initializes this UpdatePositionArgs from the contents of "argsObj". - */ - Status initialize(const BSONObj& argsObj); + /** + * Initializes this UpdatePositionArgs from the contents of "argsObj". + */ + Status initialize(const BSONObj& argsObj); - /** - * Gets a begin iterator over the UpdateInfos stored in this UpdatePositionArgs. - */ - UpdateIterator updatesBegin() const { return _updates.begin(); } + /** + * Gets a begin iterator over the UpdateInfos stored in this UpdatePositionArgs. + */ + UpdateIterator updatesBegin() const { + return _updates.begin(); + } - /** - * Gets an end iterator over the UpdateInfos stored in this UpdatePositionArgs. - */ - UpdateIterator updatesEnd() const { return _updates.end(); } + /** + * Gets an end iterator over the UpdateInfos stored in this UpdatePositionArgs. + */ + UpdateIterator updatesEnd() const { + return _updates.end(); + } - /** - * Returns a BSONified version of the object. - * _updates is only included if it is not empty. - */ - BSONObj toBSON() const; - private: - std::vector<UpdateInfo> _updates; - }; + /** + * Returns a BSONified version of the object. + * _updates is only included if it is not empty. + */ + BSONObj toBSON() const; + +private: + std::vector<UpdateInfo> _updates; +}; -} // namespace repl -} // namespace mongo +} // namespace repl +} // namespace mongo |