diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-04-13 15:12:00 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-04-19 10:23:28 -0400 |
commit | ed3c29f86efcd7a7106bbc3426213f73b16872e9 (patch) | |
tree | 98c1c41ab38903fb8a6628646f0de911af26e035 /src/mongo/s/grid.h | |
parent | f489fa393f3d878cc2284d1b8d13243099140dff (diff) | |
download | mongo-ed3c29f86efcd7a7106bbc3426213f73b16872e9.tar.gz |
SERVER-23696 Consolidate balancer configuration into single class
In addition fixes linking dependencies.
Diffstat (limited to 'src/mongo/s/grid.h')
-rw-r--r-- | src/mongo/s/grid.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mongo/s/grid.h b/src/mongo/s/grid.h index f0746b5f142..a990143a4c1 100644 --- a/src/mongo/s/grid.h +++ b/src/mongo/s/grid.h @@ -34,6 +34,7 @@ namespace mongo { +class BalancerConfiguration; class CatalogCache; class CatalogManager; class ClusterCursorManager; @@ -70,6 +71,7 @@ public: std::unique_ptr<CatalogCache> catalogCache, std::unique_ptr<ShardRegistry> shardRegistry, std::unique_ptr<ClusterCursorManager> cursorManager, + std::unique_ptr<BalancerConfiguration> balancerConfig, std::unique_ptr<executor::TaskExecutorPool> executorPool, executor::NetworkInterface* network); @@ -91,15 +93,15 @@ public: return _catalogManager.get(); } - CatalogCache* catalogCache() { + CatalogCache* catalogCache() const { return _catalogCache.get(); } - ShardRegistry* shardRegistry() { + ShardRegistry* shardRegistry() const { return _shardRegistry.get(); } - ClusterCursorManager* getCursorManager() { + ClusterCursorManager* getCursorManager() const { return _cursorManager.get(); } @@ -111,11 +113,12 @@ public: return _network; } - repl::OpTime configOpTime() const { - stdx::lock_guard<stdx::mutex> lk(_mutex); - return _configOpTime; + BalancerConfiguration* getBalancerConfiguration() const { + return _balancerConfig.get(); } + repl::OpTime configOpTime() const; + void advanceConfigOpTime(repl::OpTime opTime); /** @@ -134,6 +137,7 @@ private: std::unique_ptr<CatalogCache> _catalogCache; std::unique_ptr<ShardRegistry> _shardRegistry; std::unique_ptr<ClusterCursorManager> _cursorManager; + std::unique_ptr<BalancerConfiguration> _balancerConfig; // Executor pool for scheduling work and remote commands to shards and config servers. Each // contained executor has a connection hook set on it for sending/receiving sharding metadata. |