Registry of opened databases.
More...
#include <database_holder.h>
Registry of opened databases.
◆ ~DatabaseHolder()
mongo::DatabaseHolder::~DatabaseHolder |
( |
| ) |
|
|
inlinedefault |
◆ DatabaseHolder()
mongo::DatabaseHolder::DatabaseHolder |
( |
| ) |
|
|
inlineexplicit |
◆ _impl() [1/2]
const Impl& mongo::DatabaseHolder::_impl |
( |
| ) |
const |
|
inlineprivate |
◆ _impl() [2/2]
Impl& mongo::DatabaseHolder::_impl |
( |
| ) |
|
|
inlineprivate |
◆ close()
void mongo::DatabaseHolder::close |
( |
OperationContext *const |
opCtx, |
|
|
const StringData |
ns, |
|
|
const std::string & |
reason |
|
) |
| |
|
inline |
Closes the specified database.
Must be called with the database locked in X-mode. No background jobs must be in progress on the database when this function is called.
◆ closeAll()
void mongo::DatabaseHolder::closeAll |
( |
OperationContext *const |
opCtx, |
|
|
const std::string & |
reason |
|
) |
| |
|
inline |
Closes all opened databases.
Must be called with the global lock acquired in X-mode. Will uassert if any background jobs are running when this function is called.
- Parameters
-
reason | The reason for close. |
◆ get()
Database* mongo::DatabaseHolder::get |
( |
OperationContext *const |
opCtx, |
|
|
const StringData |
ns |
|
) |
| const |
|
inline |
Retrieves an already opened database or returns NULL.
Must be called with the database locked in at least IS-mode.
◆ getNamesWithConflictingCasing()
std::set<std::string> mongo::DatabaseHolder::getNamesWithConflictingCasing |
( |
const StringData |
name | ) |
|
|
inline |
Returns the set of existing database names that differ only in casing.
◆ MONGO_DECLARE_SHIM() [1/2]
static mongo::DatabaseHolder::MONGO_DECLARE_SHIM |
( |
() ->DatabaseHolder & |
| ) |
|
|
static |
◆ MONGO_DECLARE_SHIM() [2/2]
static mongo::DatabaseHolder::MONGO_DECLARE_SHIM |
( |
(PrivateTo< DatabaseHolder >) ->std::unique_ptr< Impl > |
| ) |
|
|
static |
◆ openDb()
Database* mongo::DatabaseHolder::openDb |
( |
OperationContext *const |
opCtx, |
|
|
const StringData |
ns, |
|
|
bool *const |
justCreated = nullptr |
|
) |
| |
|
inline |
Retrieves a database reference if it is already opened, or opens it if it hasn't been opened/created yet.
Must be called with the database locked in X-mode.
- Parameters
-
justCreated | Returns whether the database was newly created (true) or it already existed (false). Can be NULL if this information is not necessary. |
◆ _pimpl
std::unique_ptr<Impl> mongo::DatabaseHolder::_pimpl |
|
private |
The documentation for this class was generated from the following file: