summaryrefslogtreecommitdiff
path: root/src/mongo/s/config.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-05-13 22:18:38 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-05-13 22:18:38 -0400
commitb4516725901b1a7ff76926e68ab5479746f9a2a4 (patch)
tree8c90aeeaf407ebf75fce324bb2133ffc1ebfb1bf /src/mongo/s/config.h
parent9c2cab11a01dde39286735ab7157c72a8db8e89f (diff)
downloadmongo-b4516725901b1a7ff76926e68ab5479746f9a2a4.tar.gz
Revert "SERVER-18049 Move StaticShardInfo out of shard.cpp"
This reverts commit 890c86b961f77ed97ca1634b4679c1e02d287325.
Diffstat (limited to 'src/mongo/s/config.h')
-rw-r--r--src/mongo/s/config.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/s/config.h b/src/mongo/s/config.h
index 3be7bc1bba7..1bbb1d2dd41 100644
--- a/src/mongo/s/config.h
+++ b/src/mongo/s/config.h
@@ -125,14 +125,17 @@ namespace mongo {
// Atomically returns *either* the chunk manager *or* the primary shard for the collection,
// neither if the collection doesn't exist.
- void getChunkManagerOrPrimary(const std::string& ns,
- boost::shared_ptr<ChunkManager>& manager,
- boost::shared_ptr<Shard>& primary);
+ void getChunkManagerOrPrimary(const std::string& ns, boost::shared_ptr<ChunkManager>& manager, ShardPtr& primary);
boost::shared_ptr<ChunkManager> getChunkManager(const std::string& ns, bool reload = false, bool forceReload = false);
boost::shared_ptr<ChunkManager> getChunkManagerIfExists(const std::string& ns, bool reload = false, bool forceReload = false);
const Shard& getShard( const std::string& ns );
+ /**
+ * @return the correct for shard for the ns
+ * if the namespace is sharded, will return NULL
+ */
+ ShardPtr getShardIfExists( const std::string& ns );
void setPrimary( const std::string& s );