Storage Engine API
mongo::IndexCatalogEntryImpl Class Reference

#include <index_catalog_entry_impl.h>

Inheritance diagram for mongo::IndexCatalogEntryImpl:
mongo::IndexCatalogEntry::Impl

Classes

class  SetHeadChange
 

Public Member Functions

 IndexCatalogEntryImpl (IndexCatalogEntry *this_, OperationContext *opCtx, StringData ns, CollectionCatalogEntry *collection, std::unique_ptr< IndexDescriptor > descriptor, CollectionInfoCache *infoCache)
 
 ~IndexCatalogEntryImpl () final
 
const std::string & ns () const final
 
void init (std::unique_ptr< IndexAccessMethod > accessMethod) final
 
IndexDescriptor * descriptor () final
 
const IndexDescriptor * descriptor () const final
 
IndexAccessMethod * accessMethod () final
 
const IndexAccessMethod * accessMethod () const final
 
const Ordering & ordering () const final
 
const MatchExpression * getFilterExpression () const final
 
const CollatorInterface * getCollator () const final
 
const RecordId & head (OperationContext *opCtx) const final
 
More...
 
void setHead (OperationContext *opCtx, RecordId newHead) final
 
void setIsReady (bool newIsReady) final
 
HeadManagerheadManager () const final
 
bool isMultikey (OperationContext *opCtx) const final
 Returns true if this index is multikey, and returns false otherwise. More...
 
MultikeyPaths getMultikeyPaths (OperationContext *opCtx) const final
 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 *opCtx, const MultikeyPaths &multikeyPaths) final
 Sets this index to be multikey. More...
 
bool isReady (OperationContext *opCtx) const final
 
KVPrefix getPrefix () const final
 
boost::optional< Timestamp > getMinimumVisibleSnapshot () final
 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 (Timestamp name) final
 
- Public Member Functions inherited from mongo::IndexCatalogEntry::Impl
virtual ~Impl ()=0
 

Private Member Functions

 MONGO_DISALLOW_COPYING (IndexCatalogEntryImpl)
 
bool _catalogIsReady (OperationContext *opCtx) const
 
RecordId _catalogHead (OperationContext *opCtx) const
 
bool _catalogIsMultikey (OperationContext *opCtx, MultikeyPaths *multikeyPaths) const
 Retrieves the multikey information associated with this index from '_collection',. More...
 
KVPrefix _catalogGetPrefix (OperationContext *opCtx) const
 

Private Attributes

std::string _ns
 
CollectionCatalogEntry_collection
 
std::unique_ptr< IndexDescriptor > _descriptor
 
CollectionInfoCache_infoCache
 
std::unique_ptr< IndexAccessMethod > _accessMethod
 
std::unique_ptr< HeadManager_headManager
 
std::unique_ptr< CollatorInterface > _collator
 
std::unique_ptr< MatchExpression > _filterExpression
 
Ordering _ordering
 
bool _isReady
 
RecordId _head
 
bool _indexTracksPathLevelMultikeyInfo = false
 
AtomicWord< bool > _isMultikey
 
stdx::mutex _indexMultikeyPathsMutex
 
MultikeyPaths _indexMultikeyPaths
 
const KVPrefix _prefix
 
boost::optional< Timestamp > _minVisibleSnapshot
 

Constructor & Destructor Documentation

◆ IndexCatalogEntryImpl()

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

◆ ~IndexCatalogEntryImpl()

mongo::IndexCatalogEntryImpl::~IndexCatalogEntryImpl ( )
final

Member Function Documentation

◆ _catalogGetPrefix()

KVPrefix mongo::IndexCatalogEntryImpl::_catalogGetPrefix ( OperationContext *  opCtx) const
private

◆ _catalogHead()

RecordId mongo::IndexCatalogEntryImpl::_catalogHead ( OperationContext *  opCtx) const
private

◆ _catalogIsMultikey()

bool mongo::IndexCatalogEntryImpl::_catalogIsMultikey ( OperationContext *  opCtx,
MultikeyPaths *  multikeyPaths 
) const
private

Retrieves the multikey information associated with this index from '_collection',.

See CollectionCatalogEntry::isIndexMultikey() for more details.

◆ _catalogIsReady()

bool mongo::IndexCatalogEntryImpl::_catalogIsReady ( OperationContext *  opCtx) const
private

◆ accessMethod() [1/2]

IndexAccessMethod* mongo::IndexCatalogEntryImpl::accessMethod ( )
inlinefinalvirtual

◆ accessMethod() [2/2]

const IndexAccessMethod* mongo::IndexCatalogEntryImpl::accessMethod ( ) const
inlinefinalvirtual

◆ descriptor() [1/2]

IndexDescriptor* mongo::IndexCatalogEntryImpl::descriptor ( )
inlinefinalvirtual

◆ descriptor() [2/2]

const IndexDescriptor* mongo::IndexCatalogEntryImpl::descriptor ( ) const
inlinefinalvirtual

◆ getCollator()

const CollatorInterface* mongo::IndexCatalogEntryImpl::getCollator ( ) const
inlinefinalvirtual

◆ getFilterExpression()

const MatchExpression* mongo::IndexCatalogEntryImpl::getFilterExpression ( ) const
inlinefinalvirtual

◆ getMinimumVisibleSnapshot()

boost::optional<Timestamp> mongo::IndexCatalogEntryImpl::getMinimumVisibleSnapshot ( )
inlinefinalvirtual

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

Implements mongo::IndexCatalogEntry::Impl.

◆ getMultikeyPaths()

MultikeyPaths mongo::IndexCatalogEntryImpl::getMultikeyPaths ( OperationContext *  opCtx) const
finalvirtual

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.

Implements mongo::IndexCatalogEntry::Impl.

◆ getPrefix()

KVPrefix mongo::IndexCatalogEntryImpl::getPrefix ( ) const
inlinefinalvirtual

◆ head()

const RecordId & mongo::IndexCatalogEntryImpl::head ( OperationContext *  opCtx) const
finalvirtual

◆ headManager()

HeadManager* mongo::IndexCatalogEntryImpl::headManager ( ) const
inlinefinalvirtual

◆ init()

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

◆ isMultikey()

bool mongo::IndexCatalogEntryImpl::isMultikey ( OperationContext *  opCtx) const
finalvirtual

Returns true if this index is multikey, and returns false otherwise.

Implements mongo::IndexCatalogEntry::Impl.

◆ isReady()

bool mongo::IndexCatalogEntryImpl::isReady ( OperationContext *  opCtx) const
finalvirtual

◆ MONGO_DISALLOW_COPYING()

mongo::IndexCatalogEntryImpl::MONGO_DISALLOW_COPYING ( IndexCatalogEntryImpl  )
private

◆ ns()

const std::string& mongo::IndexCatalogEntryImpl::ns ( ) const
inlinefinalvirtual

◆ ordering()

const Ordering& mongo::IndexCatalogEntryImpl::ordering ( ) const
inlinefinalvirtual

◆ setHead()

void mongo::IndexCatalogEntryImpl::setHead ( OperationContext *  opCtx,
RecordId  newHead 
)
finalvirtual

◆ setIsReady()

void mongo::IndexCatalogEntryImpl::setIsReady ( bool  newIsReady)
finalvirtual

◆ setMinimumVisibleSnapshot()

void mongo::IndexCatalogEntryImpl::setMinimumVisibleSnapshot ( Timestamp  name)
inlinefinalvirtual

◆ setMultikey()

void mongo::IndexCatalogEntryImpl::setMultikey ( OperationContext *  opCtx,
const MultikeyPaths &  multikeyPaths 
)
finalvirtual

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.

Implements mongo::IndexCatalogEntry::Impl.

Member Data Documentation

◆ _accessMethod

std::unique_ptr<IndexAccessMethod> mongo::IndexCatalogEntryImpl::_accessMethod
private

◆ _collator

std::unique_ptr<CollatorInterface> mongo::IndexCatalogEntryImpl::_collator
private

◆ _collection

CollectionCatalogEntry* mongo::IndexCatalogEntryImpl::_collection
private

◆ _descriptor

std::unique_ptr<IndexDescriptor> mongo::IndexCatalogEntryImpl::_descriptor
private

◆ _filterExpression

std::unique_ptr<MatchExpression> mongo::IndexCatalogEntryImpl::_filterExpression
private

◆ _head

RecordId mongo::IndexCatalogEntryImpl::_head
private

◆ _headManager

std::unique_ptr<HeadManager> mongo::IndexCatalogEntryImpl::_headManager
private

◆ _indexMultikeyPaths

MultikeyPaths mongo::IndexCatalogEntryImpl::_indexMultikeyPaths
private

◆ _indexMultikeyPathsMutex

stdx::mutex mongo::IndexCatalogEntryImpl::_indexMultikeyPathsMutex
mutableprivate

◆ _indexTracksPathLevelMultikeyInfo

bool mongo::IndexCatalogEntryImpl::_indexTracksPathLevelMultikeyInfo = false
private

◆ _infoCache

CollectionInfoCache* mongo::IndexCatalogEntryImpl::_infoCache
private

◆ _isMultikey

AtomicWord<bool> mongo::IndexCatalogEntryImpl::_isMultikey
private

◆ _isReady

bool mongo::IndexCatalogEntryImpl::_isReady
private

◆ _minVisibleSnapshot

boost::optional<Timestamp> mongo::IndexCatalogEntryImpl::_minVisibleSnapshot
private

◆ _ns

std::string mongo::IndexCatalogEntryImpl::_ns
private

◆ _ordering

Ordering mongo::IndexCatalogEntryImpl::_ordering
private

◆ _prefix

const KVPrefix mongo::IndexCatalogEntryImpl::_prefix
private

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