Storage Engine API
mongo::KVDatabaseCatalogEntryBase Class Referenceabstract

#include <kv_database_catalog_entry_base.h>

Inheritance diagram for mongo::KVDatabaseCatalogEntryBase:
mongo::DatabaseCatalogEntry mongo::KVDatabaseCatalogEntry mongo::KVDatabaseCatalogEntryMock

Classes

class  AddCollectionChange
 
class  RemoveCollectionChange
 

Public Member Functions

 KVDatabaseCatalogEntryBase (StringData db, KVStorageEngine *engine)
 
 ~KVDatabaseCatalogEntryBase () override
 
bool exists () const override
 
bool isEmpty () const override
 
bool hasUserData () const override
 
int64_t sizeOnDisk (OperationContext *opCtx) const override
 
void appendExtraStats (OperationContext *opCtx, BSONObjBuilder *out, double scale) const override
 
bool isOlderThan24 (OperationContext *opCtx) const override
 
void markIndexSafe24AndUp (OperationContext *opCtx) override
 
Status currentFilesCompatible (OperationContext *opCtx) const override
 Returns whethers the data files are compatible with the current code: More...
 
void getCollectionNamespaces (std::list< std::string > *out) const override
 
CollectionCatalogEntrygetCollectionCatalogEntry (StringData ns) const override
 
RecordStoregetRecordStore (StringData ns) const override
 
IndexAccessMethod * getIndex (OperationContext *opCtx, const CollectionCatalogEntry *collection, IndexCatalogEntry *index) override=0
 
Status createCollection (OperationContext *opCtx, StringData ns, const CollectionOptions &options, bool allocateDefaultSpace) override
 
Status renameCollection (OperationContext *opCtx, StringData fromNS, StringData toNS, bool stayTemp) override
 
Status dropCollection (OperationContext *opCtx, StringData ns) override
 
void initCollection (OperationContext *opCtx, const std::string &ns, bool forRepair)
 
void initCollectionBeforeRepair (OperationContext *opCtx, const std::string &ns)
 
void reinitCollectionAfterRepair (OperationContext *opCtx, const std::string &ns)
 
- Public Member Functions inherited from mongo::DatabaseCatalogEntry
 DatabaseCatalogEntry (StringData name)
 
virtual ~DatabaseCatalogEntry ()
 
const std::string & name () const
 

Protected Types

typedef std::map< std::string, KVCollectionCatalogEntry * > CollectionMap
 

Protected Attributes

KVStorageEngine *const _engine
 
CollectionMap _collections
 

Member Typedef Documentation

◆ CollectionMap

Constructor & Destructor Documentation

◆ KVDatabaseCatalogEntryBase()

mongo::KVDatabaseCatalogEntryBase::KVDatabaseCatalogEntryBase ( StringData  db,
KVStorageEngine engine 
)

◆ ~KVDatabaseCatalogEntryBase()

mongo::KVDatabaseCatalogEntryBase::~KVDatabaseCatalogEntryBase ( )
override

Member Function Documentation

◆ appendExtraStats()

void mongo::KVDatabaseCatalogEntryBase::appendExtraStats ( OperationContext *  opCtx,
BSONObjBuilder *  out,
double  scale 
) const
overridevirtual

◆ createCollection()

Status mongo::KVDatabaseCatalogEntryBase::createCollection ( OperationContext *  opCtx,
StringData  ns,
const CollectionOptions options,
bool  allocateDefaultSpace 
)
overridevirtual

◆ currentFilesCompatible()

Status mongo::KVDatabaseCatalogEntryBase::currentFilesCompatible ( OperationContext *  opCtx) const
overridevirtual

Returns whethers the data files are compatible with the current code:

  • Status::OK() if the data files are compatible with the current code.
  • ErrorCodes::CanRepairToDowngrade if the data files are incompatible with the current code, but a –repair would make them compatible. For example, when rebuilding all indexes in the data files would resolve the incompatibility.
  • ErrorCodes::MustUpgrade if the data files are incompatible with the current code and a newer version is required to start up.

Implements mongo::DatabaseCatalogEntry.

◆ dropCollection()

Status mongo::KVDatabaseCatalogEntryBase::dropCollection ( OperationContext *  opCtx,
StringData  ns 
)
overridevirtual

◆ exists()

bool mongo::KVDatabaseCatalogEntryBase::exists ( ) const
overridevirtual

◆ getCollectionCatalogEntry()

CollectionCatalogEntry * mongo::KVDatabaseCatalogEntryBase::getCollectionCatalogEntry ( StringData  ns) const
overridevirtual

◆ getCollectionNamespaces()

void mongo::KVDatabaseCatalogEntryBase::getCollectionNamespaces ( std::list< std::string > *  out) const
overridevirtual

◆ getIndex()

IndexAccessMethod* mongo::KVDatabaseCatalogEntryBase::getIndex ( OperationContext *  opCtx,
const CollectionCatalogEntry collection,
IndexCatalogEntry index 
)
overridepure virtual

◆ getRecordStore()

RecordStore * mongo::KVDatabaseCatalogEntryBase::getRecordStore ( StringData  ns) const
overridevirtual

◆ hasUserData()

bool mongo::KVDatabaseCatalogEntryBase::hasUserData ( ) const
overridevirtual

◆ initCollection()

void mongo::KVDatabaseCatalogEntryBase::initCollection ( OperationContext *  opCtx,
const std::string &  ns,
bool  forRepair 
)

◆ initCollectionBeforeRepair()

void mongo::KVDatabaseCatalogEntryBase::initCollectionBeforeRepair ( OperationContext *  opCtx,
const std::string &  ns 
)

◆ isEmpty()

bool mongo::KVDatabaseCatalogEntryBase::isEmpty ( ) const
overridevirtual

◆ isOlderThan24()

bool mongo::KVDatabaseCatalogEntryBase::isOlderThan24 ( OperationContext *  opCtx) const
inlineoverridevirtual

◆ markIndexSafe24AndUp()

void mongo::KVDatabaseCatalogEntryBase::markIndexSafe24AndUp ( OperationContext *  opCtx)
inlineoverridevirtual

◆ reinitCollectionAfterRepair()

void mongo::KVDatabaseCatalogEntryBase::reinitCollectionAfterRepair ( OperationContext *  opCtx,
const std::string &  ns 
)

◆ renameCollection()

Status mongo::KVDatabaseCatalogEntryBase::renameCollection ( OperationContext *  opCtx,
StringData  fromNS,
StringData  toNS,
bool  stayTemp 
)
overridevirtual

◆ sizeOnDisk()

int64_t mongo::KVDatabaseCatalogEntryBase::sizeOnDisk ( OperationContext *  opCtx) const
overridevirtual

Member Data Documentation

◆ _collections

CollectionMap mongo::KVDatabaseCatalogEntryBase::_collections
protected

◆ _engine

KVStorageEngine* const mongo::KVDatabaseCatalogEntryBase::_engine
protected

The documentation for this class was generated from the following files: