summaryrefslogtreecommitdiff
path: root/db/repl/rs_member.h
diff options
context:
space:
mode:
Diffstat (limited to 'db/repl/rs_member.h')
-rw-r--r--db/repl/rs_member.h6
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. */