summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context.h
diff options
context:
space:
mode:
authorSamantha Ritter <samantha.ritter@10gen.com>2016-05-31 14:05:17 -0400
committerJason Carey <jcarey@argv.me>2016-07-12 18:38:37 -0400
commitc263ce1f95586f8652058e6202015a77f9becc49 (patch)
treed623fb9da9fd5da3cc4e20cac0653f1fa4af00eb /src/mongo/db/service_context.h
parentdead3cf8b4b3cb5528ad1abb9eeb722b395e3632 (diff)
downloadmongo-c263ce1f95586f8652058e6202015a77f9becc49.tar.gz
SERVER-24162 Integrate TransportLayer
Expand the transport layer as needed to replace uses of abstract message port for ingress networking.
Diffstat (limited to 'src/mongo/db/service_context.h')
-rw-r--r--src/mongo/db/service_context.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/mongo/db/service_context.h b/src/mongo/db/service_context.h
index fe6a4432d70..174a52ebe52 100644
--- a/src/mongo/db/service_context.h
+++ b/src/mongo/db/service_context.h
@@ -48,6 +48,12 @@ class Client;
class OperationContext;
class OpObserver;
+namespace transport {
+class Session;
+class TransportLayer;
+class TransportLayerManager;
+} // namespace transport
+
/**
* Classes that implement this interface can receive notification on killOp.
*
@@ -207,9 +213,9 @@ public:
*
* The "desc" string is used to set a descriptive name for the client, used in logging.
*
- * If supplied, "p" is the communication channel used for communicating with the client.
+ * If supplied, "session" is the transport::Session used for communicating with the client.
*/
- UniqueClient makeClient(std::string desc, AbstractMessagingPort* p = nullptr);
+ UniqueClient makeClient(std::string desc, transport::Session* session = nullptr);
/**
* Creates a new OperationContext on "client".
@@ -299,6 +305,26 @@ public:
void registerKillOpListener(KillOpListenerInterface* listener);
//
+ // Transport.
+ //
+
+ /**
+ * Get the master TransportLayer. Routes to all other TransportLayers that
+ * may be in use within this service.
+ *
+ * See TransportLayerManager for more details.
+ */
+ transport::TransportLayer* getTransportLayer() const;
+
+ /**
+ * Add a new TransportLayer to this service context. The new TransportLayer will
+ * be added to the TransportLayerManager accessible via getTransportLayer().
+ *
+ * It additionally calls start() on the TransportLayer after adding it.
+ */
+ Status addAndStartTransportLayer(std::unique_ptr<transport::TransportLayer> tl);
+
+ //
// Global OpObserver.
//
@@ -370,6 +396,11 @@ private:
/**
+ * The TransportLayerManager.
+ */
+ std::unique_ptr<transport::TransportLayerManager> _transportLayerManager;
+
+ /**
* Vector of registered observers.
*/
std::vector<std::unique_ptr<ClientObserver>> _clientObservers;