diff options
author | matt dannenberg <matt.dannenberg@10gen.com> | 2015-09-16 08:23:33 -0400 |
---|---|---|
committer | matt dannenberg <matt.dannenberg@10gen.com> | 2015-09-17 05:25:25 -0400 |
commit | b7ac467dbe15275ffcd51f446f9b42491f29e922 (patch) | |
tree | b39273bb2e55c9f20c60adf2837b6bad5ce33ecf /src/mongo/db/repl/optime.h | |
parent | aa190f0e2b34d29231b2ddd6660e641821071c1f (diff) | |
download | mongo-b7ac467dbe15275ffcd51f446f9b42491f29e922.tar.gz |
SERVER-19905 consistently use t as the field name for the term portion of an OpTime
Diffstat (limited to 'src/mongo/db/repl/optime.h')
-rw-r--r-- | src/mongo/db/repl/optime.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/repl/optime.h b/src/mongo/db/repl/optime.h index c530ca51f97..0af26bc8250 100644 --- a/src/mongo/db/repl/optime.h +++ b/src/mongo/db/repl/optime.h @@ -49,6 +49,9 @@ namespace repl { class OpTime { public: + static const char kTimestampFieldName[]; + static const char kTermFieldName[]; + // The term of an OpTime generated by old protocol version. static const long long kUninitializedTerm = -1; @@ -70,11 +73,11 @@ public: /** * Serializes the contents of this optime to the specified builder in the form: - * { ts: <timestamp>, t: term } + * subObjName : { ts: <timestamp>, t: <term> } */ - void append(BSONObjBuilder* builder) const; + void append(BSONObjBuilder* builder, const std::string& subObjName) const; - static StatusWith<OpTime> parseFromBSON(const BSONObj& obj); + static StatusWith<OpTime> parseFromOplogEntry(const BSONObj& obj); std::string toString() const; |