mongo::DBConfig Class Reference

#include <config.h>

Inheritance diagram for mongo::DBConfig:
Inheritance graph
[legend]

List of all members.

Classes

struct  CollectionInfo

Public Member Functions

 DBConfig (string name)
bool dropDatabase (string &errmsg)
void enableSharding ()
void getAllShards (set< Shard > &shards) const
ChunkManagerPtr getChunkManager (const string &ns, bool reload=false)
string getName ()
const ShardgetPrimary () const
const ShardgetShard (const string &ns)
bool isSharded (const string &ns)
bool isShardingEnabled ()
bool load ()
bool reload ()
bool removeSharding (const string &ns)
void serialize (BSONObjBuilder &to)
void setPrimary (string s)
ChunkManagerPtr shardCollection (const string &ns, ShardKeyPattern fieldsAndOrder, bool unique)
void unserialize (const BSONObj &from)
virtual ~DBConfig ()

Protected Member Functions

bool _dropShardedCollections (int &num, set< Shard > &allServers, string &errmsg)
bool _isSharded (const string &ns)
bool _load ()
bool _reload ()
void _save ()

Protected Attributes

Collections _collections
mongo::mutex _lock
string _name
Shard _primary
bool _shardingEnabled

Private Types

typedef map< string,
CollectionInfo
Collections

Detailed Description

top level configuration for a database

Definition at line 63 of file config.h.


Member Typedef Documentation

typedef map<string,CollectionInfo> mongo::DBConfig::Collections [private]

Definition at line 96 of file config.h.


Constructor & Destructor Documentation

mongo::DBConfig::DBConfig ( string  name  )  [inline]

Definition at line 100 of file config.h.

virtual mongo::DBConfig::~DBConfig (  )  [inline, virtual]

Definition at line 107 of file config.h.


Member Function Documentation

bool mongo::DBConfig::_dropShardedCollections ( int &  num,
set< Shard > &  allServers,
string &  errmsg 
) [protected]
bool mongo::DBConfig::_isSharded ( const string &  ns  )  [protected]

lockless

bool mongo::DBConfig::_load (  )  [protected]
bool mongo::DBConfig::_reload (  )  [protected]
void mongo::DBConfig::_save (  )  [protected]
bool mongo::DBConfig::dropDatabase ( string &  errmsg  ) 
void mongo::DBConfig::enableSharding (  ) 
void mongo::DBConfig::getAllShards ( set< Shard > &  shards  )  const
ChunkManagerPtr mongo::DBConfig::getChunkManager ( const string &  ns,
bool  reload = false 
)
string mongo::DBConfig::getName (  )  [inline]

Definition at line 109 of file config.h.

const Shard& mongo::DBConfig::getPrimary (  )  const [inline]

Definition at line 139 of file config.h.

const Shard& mongo::DBConfig::getShard ( const string &  ns  ) 
Returns:
the correct for shard for the ns if the namespace is sharded, will return NULL
bool mongo::DBConfig::isSharded ( const string &  ns  ) 
Returns:
whether or not the 'ns' collection is partitioned
bool mongo::DBConfig::isShardingEnabled (  )  [inline]
Returns:
if anything in this db is partitioned or not

Definition at line 114 of file config.h.

bool mongo::DBConfig::load (  ) 
bool mongo::DBConfig::reload (  ) 
bool mongo::DBConfig::removeSharding ( const string &  ns  ) 
Returns:
true if there was sharding info to remove
void mongo::DBConfig::serialize ( BSONObjBuilder to  ) 
void mongo::DBConfig::setPrimary ( string  s  ) 
ChunkManagerPtr mongo::DBConfig::shardCollection ( const string &  ns,
ShardKeyPattern  fieldsAndOrder,
bool  unique 
)
void mongo::DBConfig::unserialize ( const BSONObj from  ) 

Member Data Documentation

Definition at line 180 of file config.h.

Definition at line 182 of file config.h.

string mongo::DBConfig::_name [protected]

Definition at line 173 of file config.h.

Definition at line 174 of file config.h.

Definition at line 175 of file config.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:55 2013