summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context.h
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@10gen.com>2020-09-11 20:09:59 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-14 04:57:01 +0000
commit827a25eb01bc5ddf766b3a543ef0ba5112953e1b (patch)
tree504935db5b1292818dcd9b862bf8b5c3b4352fb5 /src/mongo/db/service_context.h
parentbd320bc2d10cff75756a2c95986cc81ec8a5e7c7 (diff)
downloadmongo-827a25eb01bc5ddf766b3a543ef0ba5112953e1b.tar.gz
SERVER-50867 Roll back ServiceStateMachine changes temporarily
This reverts these commits: b039b24746e1d1fb10a32e1ca4831423c01d4cd7: SERVER-48980 97e16187ff3065d242a61a52e7b6edd4d439fb30: SERVER-49072 0607a6c291bf4cf4580a4444d826ed3c3ac3df47: SERVER-49104
Diffstat (limited to 'src/mongo/db/service_context.h')
-rw-r--r--src/mongo/db/service_context.h19
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;