diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-06-10 15:00:59 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-06-11 13:32:10 -0400 |
commit | 7c028e4f68c73d4e598b4836051678d307fa8adb (patch) | |
tree | 527229dc646ead5b45d4473ef0ff08429fd8231a /src/mongo/client/connection_string.cpp | |
parent | 1b4c02b090b9c2fc56beca3295cdd7d5db48cf89 (diff) | |
download | mongo-7c028e4f68c73d4e598b4836051678d307fa8adb.tar.gz |
SERVER-18464 Implement ReplicaSetMonitorManager to replace statics
The ReplicaSetMonitorManager will be responsible for the lifetime of
replica set monitors and will replaces the global static variables, which
we currently use to track the replica set monitors.
This change brings us closer to having a separate instance of the replica
set monitors for MongoS.
Diffstat (limited to 'src/mongo/client/connection_string.cpp')
-rw-r--r-- | src/mongo/client/connection_string.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/client/connection_string.cpp b/src/mongo/client/connection_string.cpp index 08c601b1e9f..ec10f39f1a6 100644 --- a/src/mongo/client/connection_string.cpp +++ b/src/mongo/client/connection_string.cpp @@ -42,6 +42,14 @@ namespace mongo { _finishInit(); } + ConnectionString::ConnectionString(StringData setName, std::vector<HostAndPort> servers) + : _type(SET), + _servers(std::move(servers)), + _setName(setName.toString()) { + + _finishInit(); + } + ConnectionString::ConnectionString(ConnectionType type, const std::string& s, const std::string& setName) { @@ -81,6 +89,11 @@ namespace mongo { _finishInit(); } + ConnectionString ConnectionString::forReplicaSet(StringData setName, + std::vector<HostAndPort> servers) { + return ConnectionString(setName, std::move(servers)); + } + void ConnectionString::_fillServers( std::string s ) { // |