summaryrefslogtreecommitdiff
path: root/src/mongo/s/grid.h
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2016-04-06 11:36:13 -0400
committerEsha Maharishi <esha.maharishi@mongodb.com>2016-04-06 11:42:02 -0400
commitb9bd0eb46147a7a965f50f076dea57f85fe321e8 (patch)
tree3e5da0d44a5befe3823528476f6f0bcebdff1aa2 /src/mongo/s/grid.h
parent202fd419457c47650be27accb038a700134797ed (diff)
downloadmongo-b9bd0eb46147a7a965f50f076dea57f85fe321e8.tar.gz
SERVER-23534 move miscellaneous methods off Grid
Diffstat (limited to 'src/mongo/s/grid.h')
-rw-r--r--src/mongo/s/grid.h33
1 files changed, 5 insertions, 28 deletions
diff --git a/src/mongo/s/grid.h b/src/mongo/s/grid.h
index bd67e00bf6b..4e0fa38728b 100644
--- a/src/mongo/s/grid.h
+++ b/src/mongo/s/grid.h
@@ -28,24 +28,17 @@
#pragma once
-#include <string>
-#include <vector>
+#include <memory>
-#include "mongo/s/catalog/catalog_manager.h"
-#include "mongo/s/query/cluster_cursor_manager.h"
-#include "mongo/stdx/memory.h"
+#include "mongo/db/repl/optime.h"
namespace mongo {
-class BSONObj;
class CatalogCache;
-class DBConfig;
+class CatalogManager;
+class ClusterCursorManager;
class OperationContext;
-class SettingsType;
class ShardRegistry;
-template <typename T>
-class StatusWith;
-
/**
* Holds the global sharding context. Single instance exists for a running server. Exists on
@@ -63,16 +56,11 @@ public:
* state using clearForUnitTests.
*/
void init(std::unique_ptr<CatalogManager> catalogManager,
+ std::unique_ptr<CatalogCache> catalogCache,
std::unique_ptr<ShardRegistry> shardRegistry,
std::unique_ptr<ClusterCursorManager> cursorManager);
/**
- * Implicitly creates the specified database as non-sharded.
- */
- StatusWith<std::shared_ptr<DBConfig>> implicitCreateDb(OperationContext* txn,
- const std::string& dbName);
-
- /**
* @return true if shards and config servers are allowed to use 'localhost' in address
*/
bool allowLocalHost() const;
@@ -83,17 +71,6 @@ public:
void setAllowLocalHost(bool allow);
/**
- * Returns true if the balancer should be running. Caller is responsible
- * for making sure settings has the balancer key.
- */
- bool shouldBalance(const SettingsType& balancerSettings) const;
-
- /**
- * Returns true if the config server settings indicate that the balancer should be active.
- */
- bool getConfigShouldBalance(OperationContext* txn) const;
-
- /**
* Returns a pointer to a CatalogManager to use for accessing catalog data stored on the config
* servers.
*/