diff options
author | Jonathan Reams <jbreams@mongodb.com> | 2017-06-27 14:04:53 -0400 |
---|---|---|
committer | Jonathan Reams <jbreams@mongodb.com> | 2017-07-14 16:19:40 -0400 |
commit | 1622c6b7a7971ea7fbdd4b3d5b10455e48e5cf69 (patch) | |
tree | 4cad8d64f1ace9bc13aea786b460872b1ce466c3 /src/mongo/db/service_context.h | |
parent | e0b06a9da3c0c6071f4e636f3c3ba3e8851c5db0 (diff) | |
download | mongo-1622c6b7a7971ea7fbdd4b3d5b10455e48e5cf69.tar.gz |
SERVER-29402 Implement ServiceExecutor and fixed-size test executor
Diffstat (limited to 'src/mongo/db/service_context.h')
-rw-r--r-- | src/mongo/db/service_context.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mongo/db/service_context.h b/src/mongo/db/service_context.h index 2386e3065a7..db486a72857 100644 --- a/src/mongo/db/service_context.h +++ b/src/mongo/db/service_context.h @@ -40,6 +40,7 @@ #include "mongo/stdx/functional.h" #include "mongo/stdx/memory.h" #include "mongo/stdx/mutex.h" +#include "mongo/transport/service_executor_base.h" #include "mongo/transport/session.h" #include "mongo/util/clock_source.h" #include "mongo/util/decorable.h" @@ -371,6 +372,14 @@ public: ServiceEntryPoint* getServiceEntryPoint() const; /** + * Get the service executor for the service context. + * + * See ServiceStateMachine for how this is used. Some configurations may not have a service + * executor registered and this will return a nullptr. + */ + transport::ServiceExecutor* getServiceExecutor() const; + + /** * Waits for the ServiceContext to be fully initialized and for all TransportLayers to have been * added/started. * @@ -444,6 +453,11 @@ public: */ void setTransportLayer(std::unique_ptr<transport::TransportLayer> tl); + /** + * Binds the service executor to the service context + */ + void setServiceExecutor(std::unique_ptr<transport::ServiceExecutor> exec); + protected: ServiceContext(); @@ -487,6 +501,11 @@ private: std::unique_ptr<ServiceEntryPoint> _serviceEntryPoint; /** + * The ServiceExecutor + */ + std::unique_ptr<transport::ServiceExecutor> _serviceExecutor; + + /** * Vector of registered observers. */ std::vector<std::unique_ptr<ClientObserver>> _clientObservers; |