diff options
author | Misha Tyulenev <misha@mongodb.com> | 2016-05-26 16:09:19 -0400 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2016-05-26 17:03:51 -0400 |
commit | b6221d5e2f3e95221d73947bf0fba6772b19e49b (patch) | |
tree | 908f09fd4d18e63ad07e5618efece41b2dc26351 /src/mongo/client/replica_set_monitor_manager.h | |
parent | cbb1f07f40d8487bfeb5dfce4ccfb5d461d9a2f6 (diff) | |
download | mongo-b6221d5e2f3e95221d73947bf0fba6772b19e49b.tar.gz |
SERVER-22564 Move ReplicaSetMonitor to TaskExecutor thread
Diffstat (limited to 'src/mongo/client/replica_set_monitor_manager.h')
-rw-r--r-- | src/mongo/client/replica_set_monitor_manager.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/client/replica_set_monitor_manager.h b/src/mongo/client/replica_set_monitor_manager.h index 0a69fe72a4c..a776ccda767 100644 --- a/src/mongo/client/replica_set_monitor_manager.h +++ b/src/mongo/client/replica_set_monitor_manager.h @@ -32,6 +32,7 @@ #include <vector> #include "mongo/base/disallow_copying.h" +#include "mongo/executor/task_executor.h" #include "mongo/stdx/mutex.h" #include "mongo/util/string_map.h" @@ -80,12 +81,20 @@ public: */ void report(BSONObjBuilder* builder); + /** + * Returns an executor for running RSM tasks. + */ + executor::TaskExecutor* getExecutor(); + private: using ReplicaSetMonitorsMap = StringMap<std::shared_ptr<ReplicaSetMonitor>>; // Protects access to the replica set monitors stdx::mutex _mutex; ReplicaSetMonitorsMap _monitors; + + // Executor for monitoring replica sets. + std::unique_ptr<executor::TaskExecutor> _taskExecutor; }; } // namespace mongo |