summaryrefslogtreecommitdiff
path: root/src/mongo/transport/service_entry_point.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/transport/service_entry_point.h')
-rw-r--r--src/mongo/transport/service_entry_point.h35
1 files changed, 9 insertions, 26 deletions
diff --git a/src/mongo/transport/service_entry_point.h b/src/mongo/transport/service_entry_point.h
index e22135bdaf1..abb9c225843 100644
--- a/src/mongo/transport/service_entry_point.h
+++ b/src/mongo/transport/service_entry_point.h
@@ -29,6 +29,7 @@
#pragma once
#include "mongo/base/disallow_copying.h"
+#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/db/dbmessage.h"
#include "mongo/transport/session.h"
@@ -45,29 +46,6 @@ class ServiceEntryPoint {
MONGO_DISALLOW_COPYING(ServiceEntryPoint);
public:
- /**
- * Stats for sessions open.
- */
- struct Stats {
- /**
- * Returns the number of sessions currently open.
- */
- size_t numOpenSessions = 0;
-
- /**
- * Returns the total number of sessions that have ever been created.
- */
- size_t numCreatedSessions = 0;
-
- /**
- * Returns the number of available sessions we could still open. Only relevant
- * when we are operating under a transport::Session limit (for example, in the
- * legacy implementation, we respect a maximum number of connections). If there
- * is no session limit, returns std::numeric_limits<int>::max().
- */
- size_t numAvailableSessions = 0;
- };
-
virtual ~ServiceEntryPoint() = default;
/**
@@ -81,14 +59,19 @@ public:
virtual void endAllSessions(transport::Session::TagMask tags) = 0;
/**
+ * Starts the service entry point
+ */
+ virtual Status start() = 0;
+
+ /**
* Shuts down the service entry point.
*/
virtual bool shutdown(Milliseconds timeout) = 0;
/**
- * Returns high-level stats about current sessions.
- */
- virtual Stats sessionStats() const = 0;
+ * Append high-level stats to a BSONObjBuilder for serverStatus
+ */
+ virtual void appendStats(BSONObjBuilder* bob) const = 0;
/**
* Returns the number of sessions currently open.