diff options
author | Mathias Stearn <mathias@10gen.com> | 2018-12-10 12:17:31 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2018-12-20 13:02:42 -0500 |
commit | b502c26303ad0363a6684a2497eaf8e5f39adfc5 (patch) | |
tree | 211f5b98b2782d827bc0d301078ef3d75b60e5eb /src/mongo/executor/connection_pool.h | |
parent | 3691388900021034e338786116d60fd4d480a6e7 (diff) | |
download | mongo-b502c26303ad0363a6684a2497eaf8e5f39adfc5.tar.gz |
SERVER-35688 Make ConnectionPool support transport::ConnectSSLMode
Diffstat (limited to 'src/mongo/executor/connection_pool.h')
-rw-r--r-- | src/mongo/executor/connection_pool.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mongo/executor/connection_pool.h b/src/mongo/executor/connection_pool.h index f6dfc02eb95..e6525319571 100644 --- a/src/mongo/executor/connection_pool.h +++ b/src/mongo/executor/connection_pool.h @@ -41,6 +41,7 @@ #include "mongo/stdx/mutex.h" #include "mongo/stdx/unordered_map.h" #include "mongo/transport/session.h" +#include "mongo/transport/transport_layer.h" #include "mongo/util/future.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/time_support.h" @@ -150,10 +151,15 @@ public: const stdx::function<transport::Session::TagMask(transport::Session::TagMask)>& mutateFunc) override; - Future<ConnectionHandle> get(const HostAndPort& hostAndPort, Milliseconds timeout); - void get(const HostAndPort& hostAndPort, Milliseconds timeout, GetConnectionCallback cb); + Future<ConnectionHandle> get(const HostAndPort& hostAndPort, + transport::ConnectSSLMode sslMode, + Milliseconds timeout); + void get_forTest(const HostAndPort& hostAndPort, + Milliseconds timeout, + GetConnectionCallback cb); - boost::optional<ConnectionHandle> tryGet(const HostAndPort& hostAndPort); + boost::optional<ConnectionHandle> tryGet(const HostAndPort& hostAndPort, + transport::ConnectSSLMode sslMode); void appendConnectionStats(ConnectionPoolStats* stats) const; @@ -249,6 +255,7 @@ public: * HostAndPort passed to DependentTypeFactoryInterface::makeConnection. */ virtual const HostAndPort& getHostAndPort() const = 0; + virtual transport::ConnectSSLMode getSslMode() const = 0; /** * Check if the connection is healthy using some implementation defined condition. @@ -320,6 +327,7 @@ public: * Makes a new connection given a host and port */ virtual std::shared_ptr<ConnectionInterface> makeConnection(const HostAndPort& hostAndPort, + transport::ConnectSSLMode sslMode, size_t generation) = 0; /** |