diff options
Diffstat (limited to 'src/mongo/db/repl/primary_only_service.h')
-rw-r--r-- | src/mongo/db/repl/primary_only_service.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/repl/primary_only_service.h b/src/mongo/db/repl/primary_only_service.h index 0d57cf96d9b..664ecd9fa11 100644 --- a/src/mongo/db/repl/primary_only_service.h +++ b/src/mongo/db/repl/primary_only_service.h @@ -217,6 +217,11 @@ public: */ bool isRunning() const; + /** + * Returns the number of currently running Instances of this service. + */ + size_t getNumberOfInstances(); + protected: /** * Constructs a new Instance object with the given initial state. @@ -328,6 +333,12 @@ public: */ PrimaryOnlyService* lookupServiceByNamespace(const NamespaceString& ns); + /** + * Adds a 'primaryOnlyServices' sub-obj to the 'result' BSONObjBuilder containing a count of the + * number of active instances for each registered service. + */ + void reportServiceInfo(BSONObjBuilder* result); + void onStartup(OperationContext*) final; void onShutdown() final; void onStepUpBegin(OperationContext*, long long term) final {} |