summaryrefslogtreecommitdiff
path: root/src/mongo/client/connection_string.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-06-10 16:54:56 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-06-13 15:19:43 -0400
commit97ad19ed5bc71835e9783b932411b0ea9f83d572 (patch)
tree2e58cfdd0f5f17b567aec956d7d2e69bbf3fbeb0 /src/mongo/client/connection_string.h
parent6b6cd6727d262d5db5e4f226e4da0d2bc410a4d8 (diff)
downloadmongo-97ad19ed5bc71835e9783b932411b0ea9f83d572.tar.gz
SERVER-24467 Make MoveChunkRequest and dependencies comparable
This change implements the '==' operator on MoveChunkRequest and any dependent classes which do not have it.
Diffstat (limited to 'src/mongo/client/connection_string.h')
-rw-r--r--src/mongo/client/connection_string.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mongo/client/connection_string.h b/src/mongo/client/connection_string.h
index f6b5ef419ec..91836e36812 100644
--- a/src/mongo/client/connection_string.h
+++ b/src/mongo/client/connection_string.h
@@ -110,12 +110,11 @@ public:
}
/**
- * This returns true if this and other point to the same logical entity.
- * For single nodes, thats the same address.
- * For replica sets, thats just the same replica set name.
- * For pair (deprecated) or sync cluster connections, that's the same hosts in any ordering.
+ * Returns true if two connection strings match in terms of their type and the exact order of
+ * their hosts.
*/
- bool sameLogicalEndpoint(const ConnectionString& other) const;
+ bool operator==(const ConnectionString& other) const;
+ bool operator!=(const ConnectionString& other) const;
DBClientBase* connect(std::string& errmsg, double socketTimeout = 0) const;
@@ -165,7 +164,6 @@ private:
*/
explicit ConnectionString(ConnectionType connType);
-
void _fillServers(std::string s);
void _finishInit();