Registry of opened databases.
More...
#include <database_holder_impl.h>
Registry of opened databases.
◆ DBs
◆ DatabaseHolderImpl()
mongo::DatabaseHolderImpl::DatabaseHolderImpl |
( |
| ) |
|
|
default |
◆ _getNamesWithConflictingCasing_inlock()
std::set< std::string > mongo::DatabaseHolderImpl::_getNamesWithConflictingCasing_inlock |
( |
StringData |
name | ) |
|
|
private |
◆ close()
void mongo::DatabaseHolderImpl::close |
( |
OperationContext * |
opCtx, |
|
|
StringData |
ns, |
|
|
const std::string & |
reason |
|
) |
| |
|
overridevirtual |
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.
Implements mongo::DatabaseHolder::Impl.
◆ closeAll()
void mongo::DatabaseHolderImpl::closeAll |
( |
OperationContext * |
opCtx, |
|
|
const std::string & |
reason |
|
) |
| |
|
overridevirtual |
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. |
Implements mongo::DatabaseHolder::Impl.
◆ get()
Database * mongo::DatabaseHolderImpl::get |
( |
OperationContext * |
opCtx, |
|
|
StringData |
ns |
|
) |
| const |
|
overridevirtual |
Retrieves an already opened database or returns NULL.
Must be called with the database locked in at least IS-mode.
Implements mongo::DatabaseHolder::Impl.
◆ getNamesWithConflictingCasing()
std::set< std::string > mongo::DatabaseHolderImpl::getNamesWithConflictingCasing |
( |
StringData |
name | ) |
|
|
overridevirtual |
◆ openDb()
Database * mongo::DatabaseHolderImpl::openDb |
( |
OperationContext * |
opCtx, |
|
|
StringData |
ns, |
|
|
bool * |
justCreated = nullptr |
|
) |
| |
|
overridevirtual |
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. |
Implements mongo::DatabaseHolder::Impl.
◆ _dbs
DBs mongo::DatabaseHolderImpl::_dbs |
|
private |
◆ _m
SimpleMutex mongo::DatabaseHolderImpl::_m |
|
mutableprivate |
The documentation for this class was generated from the following files: