mongo::Client::Context Class Reference
#include <client.h>
List of all members.
Detailed Description
Definition at line 135 of file db/client.h.
Constructor & Destructor Documentation
mongo::Client::Context::Context |
( |
const string & |
ns, |
|
|
string |
path = dbpath , |
|
|
mongolock * |
lock = 0 , |
|
|
bool |
doauth = true | |
|
) |
| | |
this is the main constructor use this unless there is a good reason not to
mongo::Client::Context::Context |
( |
|
) |
|
mongo::Client::Context::Context |
( |
string |
ns, |
|
|
Database * |
db, |
|
|
bool |
doauth = true | |
|
) |
| | |
if you are doing this after allowing a write there could be a race condition if someone closes that db. this checks that the DB is still valid
mongo::Client::Context::~Context |
( |
|
) |
|
Member Function Documentation
void mongo::Client::Context::_auth |
( |
int |
lockState = dbMutex.getState() |
) |
[private] |
void mongo::Client::Context::_finishInit |
( |
bool |
doauth = true |
) |
[private] |
at this point _client, _oldContext and _ns have to be set _db should not have been touched this will set _db and create if needed will also set _client->_context to this
void mongo::Client::Context::clear |
( |
|
) |
[inline] |
Database* mongo::Client::Context::db |
( |
|
) |
const [inline] |
bool mongo::Client::Context::equals |
( |
const string & |
ns, |
|
|
const string & |
path = dbpath | |
|
) |
| | const [inline] |
Client* mongo::Client::Context::getClient |
( |
|
) |
const [inline] |
bool mongo::Client::Context::inDB |
( |
const string & |
db, |
|
|
const string & |
path = dbpath | |
|
) |
| | const |
- Returns:
- true iff the current Context is using db/path
bool mongo::Client::Context::justCreated |
( |
|
) |
const [inline] |
const char* mongo::Client::Context::ns |
( |
|
) |
const [inline] |
void mongo::Client::Context::relocked |
( |
|
) |
[inline] |
call after going back into the lock, will re-establish non-thread safe stuff
Definition at line 178 of file db/client.h.
void mongo::Client::Context::unlocked |
( |
|
) |
[inline] |
call before unlocking, so clear any non-thread safe state
Definition at line 173 of file db/client.h.
Friends And Related Function Documentation
friend class CurOp [friend] |
Member Data Documentation
The documentation for this class was generated from the following file: