#include <replpair.h>
Public Types | |
enum | ReplState { State_CantArb = -3, State_Confused = -2, State_Negotiating = -1, State_Slave = 0, State_Master = 1 } |
Public Member Functions | |
void | arbitrate () |
bool | dominant (const string &myname) |
string | getInfo () |
int | negotiate (DBClientConnection *conn, string method) |
virtual DBClientConnection * | newClientConnection () const |
ReplPair (const char *remoteEnd, const char *arbiter) | |
void | setMaster (int n, const char *_comment="") |
void | setMasterLocked (int n, const char *_comment="") |
virtual | ~ReplPair () |
Public Attributes | |
string | arbHost |
ThreadSafeString | info |
string | remote |
string | remoteHost |
int | remotePort |
int | state |
Definition at line 41 of file replpair.h.
Definition at line 43 of file replpair.h.
mongo::ReplPair::ReplPair | ( | const char * | remoteEnd, | |
const char * | arbiter | |||
) | [inline] |
Definition at line 180 of file replpair.h.
virtual mongo::ReplPair::~ReplPair | ( | ) | [inline, virtual] |
Definition at line 75 of file replpair.h.
void mongo::ReplPair::arbitrate | ( | ) |
bool mongo::ReplPair::dominant | ( | const string & | myname | ) | [inline] |
Definition at line 77 of file replpair.h.
string mongo::ReplPair::getInfo | ( | ) | [inline] |
Definition at line 59 of file replpair.h.
int mongo::ReplPair::negotiate | ( | DBClientConnection * | conn, | |
string | method | |||
) |
virtual DBClientConnection* mongo::ReplPair::newClientConnection | ( | ) | const [inline, virtual] |
Definition at line 97 of file replpair.h.
void mongo::ReplPair::setMaster | ( | int | n, | |
const char * | _comment = "" | |||
) |
void mongo::ReplPair::setMasterLocked | ( | int | n, | |
const char * | _comment = "" | |||
) | [inline] |
Definition at line 83 of file replpair.h.
string mongo::ReplPair::arbHost |
Definition at line 53 of file replpair.h.
Definition at line 52 of file replpair.h.
string mongo::ReplPair::remote |
Definition at line 56 of file replpair.h.
string mongo::ReplPair::remoteHost |
Definition at line 55 of file replpair.h.
Definition at line 54 of file replpair.h.
Definition at line 51 of file replpair.h.