summaryrefslogtreecommitdiff
path: root/src/mongo/executor/connection_pool.h
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@10gen.com>2019-04-25 12:30:35 -0400
committerBen Caimano <ben.caimano@10gen.com>2019-04-26 17:29:15 -0400
commit064297825d97e928d40d3117b5c81e4828629728 (patch)
treeef6e94be771753d0c1b0a73f9d460f3c751146df /src/mongo/executor/connection_pool.h
parent8cbbba49935f632e876037f9f2d9eecc779eb96a (diff)
downloadmongo-064297825d97e928d40d3117b5c81e4828629728.tar.gz
SERVER-40819 Use ConnectionPool shared_ptr for full lifetime management
Diffstat (limited to 'src/mongo/executor/connection_pool.h')
-rw-r--r--src/mongo/executor/connection_pool.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/executor/connection_pool.h b/src/mongo/executor/connection_pool.h
index f3bfb691ff5..5944e7a527e 100644
--- a/src/mongo/executor/connection_pool.h
+++ b/src/mongo/executor/connection_pool.h
@@ -62,7 +62,7 @@ struct ConnectionPoolStats;
* The overall workflow here is to manage separate pools for each unique
* HostAndPort. See comments on the various Options for how the pool operates.
*/
-class ConnectionPool : public EgressTagCloser {
+class ConnectionPool : public EgressTagCloser, public std::enable_shared_from_this<ConnectionPool> {
class SpecificPool;
public:
@@ -167,8 +167,6 @@ public:
size_t getNumConnectionsPerHost(const HostAndPort& hostAndPort) const;
private:
- void returnConnection(ConnectionInterface* connection);
-
std::string _name;
// Options are set at startup and never changed at run time, so these are
@@ -347,7 +345,7 @@ public:
/**
* Return the executor for use with this factory
*/
- virtual OutOfLineExecutor& getExecutor() = 0;
+ virtual const std::shared_ptr<OutOfLineExecutor>& getExecutor() = 0;
/**
* Makes a new timer