diff options
author | matt dannenberg <matt.dannenberg@10gen.com> | 2014-05-19 13:28:28 -0400 |
---|---|---|
committer | matt dannenberg <matt.dannenberg@10gen.com> | 2014-05-22 12:18:42 -0400 |
commit | 3cb9955b05bdef78cb8f72f63e657d920c0fa0bb (patch) | |
tree | 7768ef10ba9b219e22a04905ffa090d56ed1592d /src/mongo/dbtests/mock/mock_replica_set.cpp | |
parent | 0d088b82f1490aa7053fdf2748a55162b30970c4 (diff) | |
download | mongo-3cb9955b05bdef78cb8f72f63e657d920c0fa0bb.tar.gz |
SERVER-14021 move all replication code into namespace replset
Diffstat (limited to 'src/mongo/dbtests/mock/mock_replica_set.cpp')
-rw-r--r-- | src/mongo/dbtests/mock/mock_replica_set.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/dbtests/mock/mock_replica_set.cpp b/src/mongo/dbtests/mock/mock_replica_set.cpp index 2c1369f2004..571a30129a7 100644 --- a/src/mongo/dbtests/mock/mock_replica_set.cpp +++ b/src/mongo/dbtests/mock/mock_replica_set.cpp @@ -53,7 +53,7 @@ namespace mongo { MockConnRegistry::get()->addServer(mockServer); - ReplSetConfig::MemberCfg config; + replset::ReplSetConfig::MemberCfg config; config.h = HostAndPort(hostName); replConfig.insert(std::make_pair(hostName, config)); } @@ -110,7 +110,7 @@ namespace mongo { ReplConfigMap::const_iterator iter = _replConfig.find(hostAndPort); fassert(16578, iter != _replConfig.end()); - const ReplSetConfig::MemberCfg& config = iter->second; + const replset::ReplSetConfig::MemberCfg& config = iter->second; fassert(16579, !config.hidden && config.priority > 0 && !config.arbiterOnly); _primaryHost = hostAndPort; @@ -201,7 +201,7 @@ namespace mongo { builder.append("primary", getPrimary()); - const ReplSetConfig::MemberCfg& replConfig = configIter->second; + const replset::ReplSetConfig::MemberCfg& replConfig = configIter->second; if (replConfig.arbiterOnly) { builder.append("arbiterOnly", true); } @@ -242,13 +242,13 @@ namespace mongo { int MockReplicaSet::getState(const std::string& hostAndPort) const { if (_replConfig.count(hostAndPort) < 1) { - return static_cast<int>(MemberState::RS_SHUNNED); + return static_cast<int>(replset::MemberState::RS_SHUNNED); } else if (hostAndPort == getPrimary()) { - return static_cast<int>(MemberState::RS_PRIMARY); + return static_cast<int>(replset::MemberState::RS_PRIMARY); } else { - return static_cast<int>(MemberState::RS_SECONDARY); + return static_cast<int>(replset::MemberState::RS_SECONDARY); } } |