summaryrefslogtreecommitdiff
path: root/src/mongo/client/connection_string.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-06-10 15:00:59 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-06-11 13:32:10 -0400
commit7c028e4f68c73d4e598b4836051678d307fa8adb (patch)
tree527229dc646ead5b45d4473ef0ff08429fd8231a /src/mongo/client/connection_string.cpp
parent1b4c02b090b9c2fc56beca3295cdd7d5db48cf89 (diff)
downloadmongo-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.cpp13
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 ) {
//