summaryrefslogtreecommitdiff
path: root/s/config.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-04-27 12:32:59 -0400
committerEliot Horowitz <eliot@10gen.com>2010-04-27 12:32:59 -0400
commita19e9929255c2796700939535ca9b5323cd7f69c (patch)
tree79e3428df3efdf6e951b3f55a5c4bbcc293c2bce /s/config.h
parentdc77ed7c554844daa03d0ba92c8251e2a4233bdd (diff)
downloadmongo-a19e9929255c2796700939535ca9b5323cd7f69c.tar.gz
use Shard class instead of string for passing around Shards
Diffstat (limited to 's/config.h')
-rw-r--r--s/config.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/s/config.h b/s/config.h
index 69f0807f4f8..78a47c1c3a6 100644
--- a/s/config.h
+++ b/s/config.h
@@ -63,7 +63,7 @@ namespace mongo {
*/
class DBConfig : public Model {
public:
- DBConfig( string name = "" ) : _name( name ) , _primary("") , _shardingEnabled(false){ }
+ DBConfig( string name = "" ) : _name( name ) , _primary("config","") , _shardingEnabled(false){ }
string getName(){ return _name; };
@@ -96,7 +96,7 @@ namespace mongo {
}
void setPrimary( string s ){
- _primary = s;
+ _primary.reset( s );
}
bool reload();
@@ -115,7 +115,7 @@ namespace mongo {
protected:
- bool _dropShardedCollections( int& num, set<string>& allServers , string& errmsg );
+ bool _dropShardedCollections( int& num, set<Shard>& allServers , string& errmsg );
bool doload();
@@ -153,7 +153,7 @@ namespace mongo {
*/
void removeDB( string db );
- string pickShardForNewDB();
+ Shard pickShardForNewDB();
bool knowAboutShard( string name ) const;
@@ -176,7 +176,7 @@ namespace mongo {
virtual string modelServer(){
uassert( 10190 , "ConfigServer not setup" , _primary.ok() );
- return _primary;
+ return _primary.getConnString();
}
/**