diff options
author | samantharitter <samantha.ritter@10gen.com> | 2015-11-20 18:31:32 -0500 |
---|---|---|
committer | samantharitter <samantha.ritter@10gen.com> | 2015-12-14 15:39:39 -0500 |
commit | 7c67e25f37853c60c106d2cf08eca1b81c4133ae (patch) | |
tree | 17ac78dad87d4a200de9e51caacaf80152ef3994 /src/mongo/client/connpool.h | |
parent | 30d55cccf89160749c401e19fdc9872e24b01ef2 (diff) | |
download | mongo-7c67e25f37853c60c106d2cf08eca1b81c4133ae.tar.gz |
SERVER-21597 Fix connPoolStats to work with many NetworkInterfaces
Diffstat (limited to 'src/mongo/client/connpool.h')
-rw-r--r-- | src/mongo/client/connpool.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/client/connpool.h b/src/mongo/client/connpool.h index 570510ee2b3..586f1958319 100644 --- a/src/mongo/client/connpool.h +++ b/src/mongo/client/connpool.h @@ -42,6 +42,10 @@ namespace mongo { class BSONObjBuilder; class DBConnectionPool; +namespace executor { +struct ConnectionPoolStats; +} // namespace executor + /** * not thread safe * thread safety is handled by DBConnectionPool @@ -224,7 +228,7 @@ public: void release(const std::string& host, DBClientBase* c); void addHook(DBConnectionHook* hook); // we take ownership - void appendInfo(BSONObjBuilder& b); + void appendConnectionStats(executor::ConnectionPoolStats* stats) const; /** * Clears all connections for all host. @@ -274,7 +278,7 @@ private: typedef std::map<PoolKey, PoolForHost, poolKeyCompare> PoolMap; // servername -> pool - stdx::mutex _mutex; + mutable stdx::mutex _mutex; std::string _name; // The maximum number of connections we'll save in the pool per-host |