summaryrefslogtreecommitdiff
path: root/db/repl/rs_optime.h
diff options
context:
space:
mode:
authorDwight Merriman <dwight@10gen.com>2010-05-29 15:54:46 -0400
committerDwight Merriman <dwight@10gen.com>2010-05-29 15:54:46 -0400
commit41e7a264717693993614d890f87cd4d40c1f4182 (patch)
treeb83651441e24d0284745cc06ef913585ec90ad37 /db/repl/rs_optime.h
parent9d68fe11956184fb1c74963f5de66fae04fa763e (diff)
downloadmongo-41e7a264717693993614d890f87cd4d40c1f4182.tar.gz
rs minor
Diffstat (limited to 'db/repl/rs_optime.h')
-rw-r--r--db/repl/rs_optime.h12
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;
+
}