diff options
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 08e93df9cfb..bad89b6cc58 100644 --- a/src/mongo/db/service_context.h +++ b/src/mongo/db/service_context.h @@ -42,6 +42,7 @@ #include "mongo/platform/mutex.h" #include "mongo/stdx/condition_variable.h" #include "mongo/stdx/unordered_set.h" +#include "mongo/transport/service_executor.h" #include "mongo/transport/session.h" #include "mongo/util/clock_source.h" #include "mongo/util/concurrency/with_lock.h" @@ -487,6 +488,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. * @@ -571,6 +580,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); + + /** * Creates a delayed execution baton with basic functionality */ BatonHandle makeBaton(OperationContext* opCtx) const; @@ -633,6 +647,11 @@ private: std::unique_ptr<ServiceEntryPoint> _serviceEntryPoint; /** + * The ServiceExecutor + */ + std::unique_ptr<transport::ServiceExecutor> _serviceExecutor; + + /** * The storage engine, if any. */ std::unique_ptr<StorageEngine> _storageEngine; |