diff options
author | Antonin Kral <a.kral@bobek.cz> | 2010-12-10 13:05:34 +0100 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2010-12-10 13:05:34 +0100 |
commit | ed4a804c027562e1bf6a0f45dae7326198c29f8e (patch) | |
tree | 9d04736132d5421497a80619e30d4c2e03e76728 /db/repl/rs_member.h | |
parent | e598e7ada36302f35a0da8ae0c63c34b51b6a720 (diff) | |
download | mongodb-ed4a804c027562e1bf6a0f45dae7326198c29f8e.tar.gz |
Imported Upstream version 1.6.5
Diffstat (limited to 'db/repl/rs_member.h')
-rw-r--r-- | db/repl/rs_member.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/db/repl/rs_member.h b/db/repl/rs_member.h index 6a797b5..099cb22 100644 --- a/db/repl/rs_member.h +++ b/db/repl/rs_member.h @@ -67,7 +67,6 @@ namespace mongo { public: HeartbeatInfo() : _id(0xffffffff),hbstate(MemberState::RS_UNKNOWN),health(-1.0),downSince(0),skew(INT_MIN) { } HeartbeatInfo(unsigned id); - bool up() const { return health > 0; } unsigned id() const { return _id; } MemberState hbstate; double health; @@ -78,6 +77,11 @@ namespace mongo { OpTime opTime; int skew; + bool up() const { return health > 0; } + + /** health is set to -1 on startup. that means we haven't even checked yet. 0 means we checked and it failed. */ + bool maybeUp() const { return health != 0; } + long long timeDown() const; // ms /* true if changed in a way of interest to the repl set manager. */ |