Storage Engine API
mongo::IndexCatalogEntry Class Reference

#include <index_catalog_entry.h>

Classes

class  Impl
 
struct  TUHook
 

Public Member Functions

 IndexCatalogEntry (OperationContext *opCtx, StringData ns, CollectionCatalogEntry *collection, std::unique_ptr< IndexDescriptor > descriptor, CollectionInfoCache *infoCache)
 
 IndexCatalogEntry (std::unique_ptr< Impl > impl)
 
 ~IndexCatalogEntry ()=default
 
 IndexCatalogEntry (IndexCatalogEntry &&)=delete
 
IndexCatalogEntryoperator= (IndexCatalogEntry &&)=delete
 
const std::string & ns () const
 
void init (std::unique_ptr< IndexAccessMethod > accessMethod)
 
IndexDescriptor * descriptor ()
 
const IndexDescriptor * descriptor () const
 
IndexAccessMethod * accessMethod ()
 
const IndexAccessMethod * accessMethod () const
 
const Ordering & ordering () const
 
const MatchExpression * getFilterExpression () const
 
const CollatorInterface * getCollator () const
 
const RecordId & head (OperationContext *const opCtx) const
 
More...
 
void setHead (OperationContext *const opCtx, const RecordId newHead)
 
void setIsReady (const bool newIsReady)
 
HeadManagerheadManager () const
 
bool isMultikey (OperationContext *opCtx) const
 Returns true if this index is multikey and false otherwise. More...
 
MultikeyPaths getMultikeyPaths (OperationContext *const opCtx) const
 Returns the path components that cause this index to be multikey if this index supports path-level multikey tracking, and returns an empty vector if path-level multikey tracking isn't supported. More...
 
void setMultikey (OperationContext *const opCtx, const MultikeyPaths &multikeyPaths)
 Sets this index to be multikey. More...
 
bool isReady (OperationContext *const opCtx) const
 
KVPrefix getPrefix () const
 
boost::optional< Timestamp > getMinimumVisibleSnapshot ()
 If return value is not boost::none, reads with majority read concern using an older snapshot must treat this index as unfinished. More...
 
void setMinimumVisibleSnapshot (const Timestamp name)
 

Static Public Member Functions

static MONGO_DECLARE_SHIM ((IndexCatalogEntry *this_, OperationContext *opCtx, StringData ns, CollectionCatalogEntry *collection, std::unique_ptr< IndexDescriptor > descriptor, CollectionInfoCache *infoCache, PrivateTo< IndexCatalogEntry >) ->std::unique_ptr< Impl >) makeImpl
 

Private Member Functions

const Impl_impl () const
 
Impl_impl ()
 

Private Attributes

std::unique_ptr< Impl_pimpl
 

Constructor & Destructor Documentation

◆ IndexCatalogEntry() [1/3]

mongo::IndexCatalogEntry::IndexCatalogEntry ( OperationContext *  opCtx,
StringData  ns,
CollectionCatalogEntry collection,
std::unique_ptr< IndexDescriptor >  descriptor,
CollectionInfoCache infoCache 
)
explicit

◆ IndexCatalogEntry() [2/3]

mongo::IndexCatalogEntry::IndexCatalogEntry ( std::unique_ptr< Impl impl)
inlineexplicit

◆ ~IndexCatalogEntry()

mongo::IndexCatalogEntry::~IndexCatalogEntry ( )
inlinedefault

◆ IndexCatalogEntry() [3/3]

mongo::IndexCatalogEntry::IndexCatalogEntry ( IndexCatalogEntry &&  )
inlinedelete

Member Function Documentation

◆ _impl() [1/2]

const Impl& mongo::IndexCatalogEntry::_impl ( ) const
inlineprivate

◆ _impl() [2/2]

Impl& mongo::IndexCatalogEntry::_impl ( )
inlineprivate

◆ accessMethod() [1/2]

IndexAccessMethod* mongo::IndexCatalogEntry::accessMethod ( )
inline

◆ accessMethod() [2/2]

const IndexAccessMethod* mongo::IndexCatalogEntry::accessMethod ( ) const
inline

◆ descriptor() [1/2]

IndexDescriptor* mongo::IndexCatalogEntry::descriptor ( )
inline

◆ descriptor() [2/2]

const IndexDescriptor* mongo::IndexCatalogEntry::descriptor ( ) const
inline

◆ getCollator()

const CollatorInterface* mongo::IndexCatalogEntry::getCollator ( ) const
inline

◆ getFilterExpression()

const MatchExpression* mongo::IndexCatalogEntry::getFilterExpression ( ) const
inline

◆ getMinimumVisibleSnapshot()

boost::optional<Timestamp> mongo::IndexCatalogEntry::getMinimumVisibleSnapshot ( )
inline

If return value is not boost::none, reads with majority read concern using an older snapshot must treat this index as unfinished.

◆ getMultikeyPaths()

MultikeyPaths mongo::IndexCatalogEntry::getMultikeyPaths ( OperationContext *const  opCtx) const
inline

Returns the path components that cause this index to be multikey if this index supports path-level multikey tracking, and returns an empty vector if path-level multikey tracking isn't supported.

If this index supports path-level multikey tracking but isn't multikey, then this function returns a vector with size equal to the number of elements in the index key pattern where each element in the vector is an empty set.

◆ getPrefix()

KVPrefix mongo::IndexCatalogEntry::getPrefix ( ) const
inline

◆ head()

const RecordId& mongo::IndexCatalogEntry::head ( OperationContext *const  opCtx) const
inline


◆ headManager()

HeadManager* mongo::IndexCatalogEntry::headManager ( ) const
inline

◆ init()

void mongo::IndexCatalogEntry::init ( std::unique_ptr< IndexAccessMethod >  accessMethod)

◆ isMultikey()

bool mongo::IndexCatalogEntry::isMultikey ( OperationContext *  opCtx) const
inline

Returns true if this index is multikey and false otherwise.

◆ isReady()

bool mongo::IndexCatalogEntry::isReady ( OperationContext *const  opCtx) const
inline

◆ MONGO_DECLARE_SHIM()

static mongo::IndexCatalogEntry::MONGO_DECLARE_SHIM ( (IndexCatalogEntry *this_, OperationContext *opCtx, StringData ns, CollectionCatalogEntry *collection, std::unique_ptr< IndexDescriptor > descriptor, CollectionInfoCache *infoCache, PrivateTo< IndexCatalogEntry >) ->std::unique_ptr< Impl )
static

◆ ns()

const std::string& mongo::IndexCatalogEntry::ns ( ) const
inline

◆ operator=()

IndexCatalogEntry& mongo::IndexCatalogEntry::operator= ( IndexCatalogEntry &&  )
inlinedelete

◆ ordering()

const Ordering& mongo::IndexCatalogEntry::ordering ( ) const
inline

◆ setHead()

void mongo::IndexCatalogEntry::setHead ( OperationContext *const  opCtx,
const RecordId  newHead 
)
inline

◆ setIsReady()

void mongo::IndexCatalogEntry::setIsReady ( const bool  newIsReady)
inline

◆ setMinimumVisibleSnapshot()

void mongo::IndexCatalogEntry::setMinimumVisibleSnapshot ( const Timestamp  name)
inline

◆ setMultikey()

void mongo::IndexCatalogEntry::setMultikey ( OperationContext *const  opCtx,
const MultikeyPaths &  multikeyPaths 
)
inline

Sets this index to be multikey.

Information regarding which newly detected path components cause this index to be multikey can also be specified.

If this index doesn't support path-level multikey tracking, then 'multikeyPaths' is ignored.

If this index supports path-level multikey tracking, then 'multikeyPaths' must be a vector with size equal to the number of elements in the index key pattern. Additionally, at least one path component of the indexed fields must cause this index to be multikey.

If isTrackingMultikeyPathInfo() is set on the OperationContext's MultikeyPathTracker, then after we confirm that we actually need to set the index as multikey, we will save the namespace, index name, and multikey paths on the OperationContext rather than set the index as multikey here.

Member Data Documentation

◆ _pimpl

std::unique_ptr<Impl> mongo::IndexCatalogEntry::_pimpl
private

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