diff options
author | Dwight Merriman <dwight@10gen.com> | 2010-05-29 15:54:46 -0400 |
---|---|---|
committer | Dwight Merriman <dwight@10gen.com> | 2010-05-29 15:54:46 -0400 |
commit | 41e7a264717693993614d890f87cd4d40c1f4182 (patch) | |
tree | b83651441e24d0284745cc06ef913585ec90ad37 /db/repl/rs_optime.h | |
parent | 9d68fe11956184fb1c74963f5de66fae04fa763e (diff) | |
download | mongo-41e7a264717693993614d890f87cd4d40c1f4182.tar.gz |
rs minor
Diffstat (limited to 'db/repl/rs_optime.h')
-rw-r--r-- | db/repl/rs_optime.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/db/repl/rs_optime.h b/db/repl/rs_optime.h index 46cb261f1f4..46922ce4cb1 100644 --- a/db/repl/rs_optime.h +++ b/db/repl/rs_optime.h @@ -6,7 +6,17 @@ namespace mongo { struct rsoptime {
unsigned long long ord;
- void reset() { ord = ~0; }
+
+ rsoptime() : ord(0) { }
+
+ bool initiated() const { return ord > 0; }
+
+ void initiate() {
+ assert( !initiated() );
+ ord = 1000000;
+ }
};
+ extern rsoptime rsOpTime;
+
}
|