mongo::Consensus Class Reference

#include <rs.h>

List of all members.

Classes

struct  LastYea

Public Member Functions

bool aMajoritySeemsToBeUp () const
 Consensus (ReplSetImpl *t)
void electCmdReceived (BSONObj, BSONObjBuilder *)
void electSelf ()
void multiCommand (BSONObj cmd, list< Target > &L)
bool shouldRelinquish () const
int totalVotes () const

Public Attributes

time_t steppedDown

Private Member Functions

void _electSelf ()
void electionFailed (unsigned meid)
bool weAreFreshest (bool &allUp, int &nTies)
unsigned yea (unsigned memberId)

Private Attributes

Atomic< LastYealy
ReplSetImplrs
bool sleptLast

Detailed Description

Definition at line 87 of file rs.h.


Constructor & Destructor Documentation

mongo::Consensus::Consensus ( ReplSetImpl t  )  [inline]

Definition at line 101 of file rs.h.


Member Function Documentation

void mongo::Consensus::_electSelf (  )  [private]
bool mongo::Consensus::aMajoritySeemsToBeUp (  )  const
void mongo::Consensus::electCmdReceived ( BSONObj  ,
BSONObjBuilder  
)
void mongo::Consensus::electionFailed ( unsigned  meid  )  [private]
void mongo::Consensus::electSelf (  ) 
void mongo::Consensus::multiCommand ( BSONObj  cmd,
list< Target > &  L 
)
bool mongo::Consensus::shouldRelinquish (  )  const
int mongo::Consensus::totalVotes (  )  const
bool mongo::Consensus::weAreFreshest ( bool &  allUp,
int &  nTies 
) [private]
unsigned mongo::Consensus::yea ( unsigned  memberId  )  [private]

Member Data Documentation

Definition at line 94 of file rs.h.

Definition at line 88 of file rs.h.

Definition at line 99 of file rs.h.

Definition at line 109 of file rs.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:54 2013