![]() |
Storage Engine API
|
Registry of opened databases. More...
#include <database_holder_mock.h>
Registry of opened databases.
Public Member Functions | |
DatabaseHolderMock ()=default | |
Database * | get (OperationContext *opCtx, StringData ns) const override |
Retrieves an already opened database or returns nullptr. More... | |
Database * | openDb (OperationContext *opCtx, StringData ns, bool *justCreated=nullptr) override |
Retrieves a database reference if it is already opened, or opens it if it hasn't been opened/created yet. More... | |
void | close (OperationContext *opCtx, StringData ns, const std::string &reason) override |
Closes the specified database. More... | |
void | closeAll (OperationContext *opCtx, const std::string &reason) override |
Closes all opened databases. More... | |
std::set< std::string > | getNamesWithConflictingCasing (StringData name) override |
Returns the set of existing database names that differ only in casing. More... | |
![]() | |
virtual | ~Impl ()=0 |
|
default |
|
inlineoverridevirtual |
Closes the specified database.
Must be called with the database locked in X-mode.
Implements mongo::DatabaseHolder::Impl.
|
inlineoverridevirtual |
Closes all opened databases.
Must be called with the global lock acquired in X-mode.
reason The reason for close.
Implements mongo::DatabaseHolder::Impl.
|
inlineoverridevirtual |
Retrieves an already opened database or returns nullptr.
Must be called with the database locked in at least IS-mode.
Implements mongo::DatabaseHolder::Impl.
|
inlineoverridevirtual |
Returns the set of existing database names that differ only in casing.
Implements mongo::DatabaseHolder::Impl.
|
inlineoverridevirtual |
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.
justCreated Returns whether the database was newly created (true) or it already existed (false). Can be nullptr if this information is not necessary.
Implements mongo::DatabaseHolder::Impl.