mongo::Grid Class Reference
#include <grid.h>
List of all members.
Detailed Description
stores meta-information about the grid TODO: used shard_ptr for DBConfig pointers
Definition at line 34 of file grid.h.
Constructor & Destructor Documentation
mongo::Grid::Grid |
( |
|
) |
[inline] |
Member Function Documentation
static bool mongo::Grid::_balancerStopped |
( |
const BSONObj & |
balancerDoc |
) |
[static, private] |
- Parameters:
-
| balancerDoc | bson that may contain a marker to stop the balancer format { ... , stopped: [ "true" | "false" ] , ... } |
- Returns:
- true if the marker is present and is set to true
bool mongo::Grid::_getNewShardName |
( |
string * |
name |
) |
const [private] |
- Parameters:
-
| name | is the chose name for the shard. Parameter is mandatory. |
- Returns:
- true if it managed to generate a shard name. May return false if (currently) 10000 shard
static bool mongo::Grid::_inBalancingWindow |
( |
const BSONObj & |
balancerDoc, |
|
|
const boost::posix_time::ptime & |
now | |
|
) |
| | [static] |
- Parameters:
-
| balancerDoc | bson that may contain a window of time for the balancer to work format { ... , activeWindow: { start: "8:30" , stop: "19:00" } , ... } |
- Returns:
- true if there is no window of time specified for the balancer or it we're currently in it
static bool mongo::Grid::_isSpecialLocalDB |
( |
const string & |
dbName |
) |
[static, private] |
- Returns:
- whether a give dbname is used for shard "local" databases (e.g., admin or local)
bool mongo::Grid::addShard |
( |
string * |
name, |
|
|
const ConnectionString & |
servers, |
|
|
long long |
maxSize, |
|
|
string & |
errMsg | |
|
) |
| | |
addShard will create a new shard in the grid. It expects a mongod process to be runing on the provided address. Adding a shard that is a replica set is supported.
- Parameters:
-
| name | is an optional string with the name of the shard. if ommited, grid will generate one and update the parameter. |
| servers | is the connection string of the shard being added |
| maxSize | is the optional space quota in bytes. Zeros means there's no limitation to space usage |
| errMsg | is the error description in case the operation failed. |
- Returns:
- true if shard was successfully added.
bool mongo::Grid::allowLocalHost |
( |
|
) |
const |
- Returns:
- true if shards and config servers are allowed to use 'localhost' in address
DBConfigPtr mongo::Grid::getDBConfig |
( |
string |
ns, |
|
|
bool |
create = true , |
|
|
const string & |
shardNameHint = "" | |
|
) |
| | |
gets the config the db. will return an empty DBConfig if not in db already
unsigned long long mongo::Grid::getNextOpTime |
( |
|
) |
const |
bool mongo::Grid::knowAboutShard |
( |
const string & |
name |
) |
const |
- Returns:
- true if the config database knows about a host 'name'
void mongo::Grid::removeDB |
( |
string |
db |
) |
|
removes db entry. on next getDBConfig call will fetch from db
void mongo::Grid::setAllowLocalHost |
( |
bool |
allow |
) |
|
- Parameters:
-
| whether | to allow shards and config servers to use 'localhost' in address |
bool mongo::Grid::shouldBalance |
( |
|
) |
const |
- Returns:
- true if the chunk balancing functionality is enabled
Member Data Documentation
The documentation for this class was generated from the following file: