mongo::ReplSetImpl Class Reference
#include <rs.h>
List of all members.
Public Types |
enum | StartupStatus {
PRESTART = 0,
LOADINGCONFIG = 1,
BADCONFIG = 2,
EMPTYCONFIG = 3,
EMPTYUNREACHABLE = 4,
STARTED = 5,
SOON = 6
} |
Public Member Functions |
const Member * | findById (unsigned id) const |
void | msgUpdateHBInfo (HeartbeatInfo) |
unsigned | selfId () const |
void | sethbmsg (string s, int logLevel=0) |
void | syncThread () |
Static Public Member Functions |
static string | stateAsHtml (MemberState state) |
Public Attributes |
StateBox | box |
long long | lastH |
OpTime | lastOpTimeWritten |
Manager * | mgr |
Static Public Attributes |
static StartupStatus | startupStatus |
static string | startupStatusMsg |
Protected Member Functions |
void | _fatal () |
void | _fillIsMaster (BSONObjBuilder &) |
void | _fillIsMasterHost (const Member *, vector< string > &, vector< string > &, vector< string > &) |
bool | _freeze (int secs) |
void | _getOplogDiagsAsHtml (unsigned server_id, stringstream &ss) const |
void | _go () |
bool | _stepDown (int secs) |
void | _summarizeAsHtml (stringstream &) const |
void | _summarizeStatus (BSONObjBuilder &) const |
const ReplSetConfig & | config () |
bool | initFromConfig (ReplSetConfig &c, bool reconf=false) |
string | name () const |
| ReplSetImpl (ReplSetCmdline &) |
void | setSelfTo (Member *) |
MemberState | state () const |
Protected Attributes |
bool | _buildIndexes |
char | _hbmsg [256] |
time_t | _hbmsgTime |
Member * | _self |
Private Member Functions |
void | _changeArbiterState () |
bool | _getOplogReader (OplogReader &r, string &hn) |
void | _getTargets (list< Target > &, int &configVersion) |
bool | _isStale (OplogReader &r, const string &hn) |
bool | _loadConfigFinish (vector< ReplSetConfig > &v) |
void | _syncDoInitialSync () |
unsigned | _syncRollback (OplogReader &r) |
void | _syncThread () |
void | assumePrimary () |
void | changeState (MemberState s) |
void | endOldHealthTasks () |
void | forgetPrimary () |
const Member * | getMemberToSyncTo () |
void | getTargets (list< Target > &, int &configVersion) |
Member * | head () const |
bool | iAmArbiterOnly () const |
bool | iAmPotentiallyHot () const |
bool | initialSyncOplogApplication (const Member *primary, OpTime applyGTE, OpTime minValid) |
void | loadConfig () |
void | loadLastOpTimeWritten () |
list< HostAndPort > | memberHostnames () const |
const ReplSetConfig::MemberCfg & | myConfig () const |
void | relinquish () |
void | startHealthTaskFor (Member *m) |
void | startThreads () |
void | syncApply (const BSONObj &o) |
void | syncDoInitialSync () |
void | syncFixUp (HowToFixUp &h, OplogReader &r) |
void | syncRollback (OplogReader &r) |
void | syncTail () |
bool | tryToGoLiveAsASecondary (OpTime &) |
Private Attributes |
ReplSetConfig * | _cfg |
List1< Member > | _members |
string | _name |
const vector< HostAndPort > * | _seeds |
Consensus | elect |
set< ReplSetHealthPollTask * > | healthTasks |
Friends |
class | CmdReplSetElect |
class | Consensus |
class | FeedbackThread |
class | Manager |
class | Member |
Detailed Description
Definition at line 238 of file rs.h.
Member Enumeration Documentation
info on our state if the replset isn't yet "up". for example, if we are pre-initiation.
- Enumerator:
PRESTART |
|
LOADINGCONFIG |
|
BADCONFIG |
|
EMPTYCONFIG |
|
EMPTYUNREACHABLE |
|
STARTED |
|
SOON |
|
Definition at line 241 of file rs.h.
Constructor & Destructor Documentation
Member Function Documentation
void mongo::ReplSetImpl::_changeArbiterState |
( |
|
) |
[private] |
void mongo::ReplSetImpl::_fatal |
( |
|
) |
[protected] |
void mongo::ReplSetImpl::_fillIsMaster |
( |
BSONObjBuilder & |
|
) |
[protected] |
void mongo::ReplSetImpl::_fillIsMasterHost |
( |
const Member * |
, |
|
|
vector< string > & |
, |
|
|
vector< string > & |
, |
|
|
vector< string > & |
| |
|
) |
| | [protected] |
bool mongo::ReplSetImpl::_freeze |
( |
int |
secs |
) |
[protected] |
void mongo::ReplSetImpl::_getOplogDiagsAsHtml |
( |
unsigned |
server_id, |
|
|
stringstream & |
ss | |
|
) |
| | const [protected] |
bool mongo::ReplSetImpl::_getOplogReader |
( |
OplogReader & |
r, |
|
|
string & |
hn | |
|
) |
| | [private] |
void mongo::ReplSetImpl::_getTargets |
( |
list< Target > & |
, |
|
|
int & |
configVersion | |
|
) |
| | [private] |
void mongo::ReplSetImpl::_go |
( |
|
) |
[protected] |
bool mongo::ReplSetImpl::_isStale |
( |
OplogReader & |
r, |
|
|
const string & |
hn | |
|
) |
| | [private] |
bool mongo::ReplSetImpl::_loadConfigFinish |
( |
vector< ReplSetConfig > & |
v |
) |
[private] |
load our configuration from admin.replset. try seed machines too.
- Returns:
- true if ok; throws if config really bad; false if config doesn't include self
bool mongo::ReplSetImpl::_stepDown |
( |
int |
secs |
) |
[protected] |
void mongo::ReplSetImpl::_summarizeAsHtml |
( |
stringstream & |
|
) |
const [protected] |
void mongo::ReplSetImpl::_summarizeStatus |
( |
BSONObjBuilder & |
|
) |
const [protected] |
void mongo::ReplSetImpl::_syncDoInitialSync |
( |
|
) |
[private] |
unsigned mongo::ReplSetImpl::_syncRollback |
( |
OplogReader & |
r |
) |
[private] |
void mongo::ReplSetImpl::_syncThread |
( |
|
) |
[private] |
void mongo::ReplSetImpl::assumePrimary |
( |
|
) |
[private] |
void mongo::ReplSetImpl::changeState |
( |
MemberState |
s |
) |
[private] |
const ReplSetConfig& mongo::ReplSetImpl::config |
( |
|
) |
[inline, protected] |
void mongo::ReplSetImpl::endOldHealthTasks |
( |
|
) |
[private] |
const Member* mongo::ReplSetImpl::findById |
( |
unsigned |
id |
) |
const |
void mongo::ReplSetImpl::forgetPrimary |
( |
|
) |
[private] |
const Member* mongo::ReplSetImpl::getMemberToSyncTo |
( |
|
) |
[private] |
void mongo::ReplSetImpl::getTargets |
( |
list< Target > & |
, |
|
|
int & |
configVersion | |
|
) |
| | [private] |
Member* mongo::ReplSetImpl::head |
( |
|
) |
const [inline, private] |
Definition at line 325 of file rs.h.
bool mongo::ReplSetImpl::iAmArbiterOnly |
( |
|
) |
const [inline, private] |
Definition at line 311 of file rs.h.
bool mongo::ReplSetImpl::iAmPotentiallyHot |
( |
|
) |
const [inline, private] |
Definition at line 312 of file rs.h.
bool mongo::ReplSetImpl::initFromConfig |
( |
ReplSetConfig & |
c, |
|
|
bool |
reconf = false | |
|
) |
| | [protected] |
bool mongo::ReplSetImpl::initialSyncOplogApplication |
( |
const Member * |
primary, |
|
|
OpTime |
applyGTE, |
|
|
OpTime |
minValid | |
|
) |
| | [private] |
void mongo::ReplSetImpl::loadConfig |
( |
|
) |
[private] |
void mongo::ReplSetImpl::loadLastOpTimeWritten |
( |
|
) |
[private] |
list<HostAndPort> mongo::ReplSetImpl::memberHostnames |
( |
|
) |
const [private] |
Definition at line 310 of file rs.h.
string mongo::ReplSetImpl::name |
( |
|
) |
const [inline, protected] |
void mongo::ReplSetImpl::relinquish |
( |
|
) |
[private] |
unsigned mongo::ReplSetImpl::selfId |
( |
|
) |
const [inline] |
Definition at line 321 of file rs.h.
void mongo::ReplSetImpl::sethbmsg |
( |
string |
s, |
|
|
int |
logLevel = 0 | |
|
) |
| | |
void mongo::ReplSetImpl::setSelfTo |
( |
Member * |
|
) |
[protected] |
void mongo::ReplSetImpl::startHealthTaskFor |
( |
Member * |
m |
) |
[private] |
void mongo::ReplSetImpl::startThreads |
( |
|
) |
[private] |
MemberState mongo::ReplSetImpl::state |
( |
|
) |
const [inline, protected] |
static string mongo::ReplSetImpl::stateAsHtml |
( |
MemberState |
state |
) |
[static] |
void mongo::ReplSetImpl::syncApply |
( |
const BSONObj & |
o |
) |
[private] |
void mongo::ReplSetImpl::syncDoInitialSync |
( |
|
) |
[private] |
void mongo::ReplSetImpl::syncFixUp |
( |
HowToFixUp & |
h, |
|
|
OplogReader & |
r | |
|
) |
| | [private] |
void mongo::ReplSetImpl::syncRollback |
( |
OplogReader & |
r |
) |
[private] |
void mongo::ReplSetImpl::syncTail |
( |
|
) |
[private] |
void mongo::ReplSetImpl::syncThread |
( |
|
) |
|
bool mongo::ReplSetImpl::tryToGoLiveAsASecondary |
( |
OpTime & |
|
) |
[private] |
Friends And Related Function Documentation
friend class CmdReplSetElect [friend] |
Definition at line 333 of file rs.h.
Definition at line 336 of file rs.h.
friend class FeedbackThread [friend] |
Definition at line 332 of file rs.h.
Definition at line 335 of file rs.h.
Definition at line 334 of file rs.h.
Member Data Documentation
Definition at line 315 of file rs.h.
Definition at line 301 of file rs.h.
Definition at line 276 of file rs.h.
Definition at line 277 of file rs.h.
Definition at line 318 of file rs.h.
Definition at line 299 of file rs.h.
Definition at line 300 of file rs.h.
Definition at line 314 of file rs.h.
Definition at line 252 of file rs.h.
Definition at line 261 of file rs.h.
Definition at line 257 of file rs.h.
Definition at line 255 of file rs.h.
Definition at line 254 of file rs.h.
Definition at line 322 of file rs.h.
Definition at line 245 of file rs.h.
Definition at line 246 of file rs.h.
The documentation for this class was generated from the following file: