diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2019-03-11 11:28:47 -0400 |
---|---|---|
committer | Ben Caimano <ben.caimano@10gen.com> | 2019-04-16 16:24:22 -0400 |
commit | d48f6caba6f97a578828d89ec2b95c41cbc5c67a (patch) | |
tree | 7ec768d3f9c4287fcd028f403a41bdd0b87c1cb3 /src/mongo/client/replica_set_monitor_manager.h | |
parent | 6fd5b4d17b87aa652381fd28cefe2a7eb5ec8d5d (diff) | |
download | mongo-d48f6caba6f97a578828d89ec2b95c41cbc5c67a.tar.gz |
SERVER-39818 Split RSM notification functionality into a new class
Diffstat (limited to 'src/mongo/client/replica_set_monitor_manager.h')
-rw-r--r-- | src/mongo/client/replica_set_monitor_manager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/client/replica_set_monitor_manager.h b/src/mongo/client/replica_set_monitor_manager.h index ed92bc3b28c..1adf42fb16d 100644 --- a/src/mongo/client/replica_set_monitor_manager.h +++ b/src/mongo/client/replica_set_monitor_manager.h @@ -32,6 +32,7 @@ #include <string> #include <vector> +#include "mongo/client/replica_set_change_notifier.h" #include "mongo/executor/task_executor.h" #include "mongo/stdx/mutex.h" #include "mongo/util/string_map.h" @@ -94,6 +95,8 @@ public: */ executor::TaskExecutor* getExecutor(); + ReplicaSetChangeNotifier& getNotifier(); + private: using ReplicaSetMonitorsMap = StringMap<std::weak_ptr<ReplicaSetMonitor>>; @@ -103,6 +106,9 @@ private: // Executor for monitoring replica sets. std::unique_ptr<executor::TaskExecutor> _taskExecutor; + // Widget to notify listeners when a RSM notices a change + ReplicaSetChangeNotifier _notifier; + // Needs to be after `_taskExecutor`, so that it will be destroyed before the `_taskExecutor`. ReplicaSetMonitorsMap _monitors; |