summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_entry_point_mongod.h
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2017-04-17 12:09:33 -0400
committerJonathan Reams <jbreams@mongodb.com>2017-04-21 11:22:53 -0400
commitf929d2cfcfe48f051c32bdded11566b885816932 (patch)
tree2d4e17c2dd4cceaa95dfcb41c773962341e7a5ec /src/mongo/db/service_entry_point_mongod.h
parentc2cb98f46c70772d054ab0885720b666ae318cf0 (diff)
downloadmongo-f929d2cfcfe48f051c32bdded11566b885816932.tar.gz
SERVER-28749 Unify ServiceEntryPointMongod and ServiceEntryPointMongos
Diffstat (limited to 'src/mongo/db/service_entry_point_mongod.h')
-rw-r--r--src/mongo/db/service_entry_point_mongod.h34
1 files changed, 7 insertions, 27 deletions
diff --git a/src/mongo/db/service_entry_point_mongod.h b/src/mongo/db/service_entry_point_mongod.h
index 4917430f02f..cffc2280ab7 100644
--- a/src/mongo/db/service_entry_point_mongod.h
+++ b/src/mongo/db/service_entry_point_mongod.h
@@ -28,42 +28,22 @@
#pragma once
-#include <vector>
-
#include "mongo/base/disallow_copying.h"
-#include "mongo/platform/atomic_word.h"
-#include "mongo/transport/service_entry_point.h"
+#include "mongo/transport/service_entry_point_impl.h"
namespace mongo {
-namespace transport {
-class Session;
-class TransportLayer;
-} // namespace transport
-
/**
- * The entry point from the TransportLayer into Mongod. startSession() spawns and
- * detaches a new thread for each incoming connection (transport::Session).
+ * The entry point into mongod. Just a wrapper around assembleResponse.
*/
-class ServiceEntryPointMongod final : public ServiceEntryPoint {
+class ServiceEntryPointMongod final : public ServiceEntryPointImpl {
MONGO_DISALLOW_COPYING(ServiceEntryPointMongod);
public:
- explicit ServiceEntryPointMongod(transport::TransportLayer* tl);
-
- virtual ~ServiceEntryPointMongod() = default;
-
- void startSession(transport::SessionHandle session) override;
-
- std::size_t getNumberOfActiveWorkerThreads() const {
- return _nWorkers.load();
- }
-
-private:
- void _sessionLoop(const transport::SessionHandle& session);
-
- transport::TransportLayer* _tl;
- AtomicWord<std::size_t> _nWorkers;
+ using ServiceEntryPointImpl::ServiceEntryPointImpl;
+ DbResponse handleRequest(OperationContext* opCtx,
+ const Message& request,
+ const HostAndPort& client) override;
};
} // namespace mongo