this is for storing things that you want to cache about a single collection life cycle is managed for you from inside Collection
More...
#include <collection_info_cache_impl.h>
this is for storing things that you want to cache about a single collection life cycle is managed for you from inside Collection
◆ CollectionInfoCacheImpl()
mongo::CollectionInfoCacheImpl::CollectionInfoCacheImpl |
( |
Collection * |
collection, |
|
|
const NamespaceString & |
ns |
|
) |
| |
|
explicit |
◆ ~CollectionInfoCacheImpl()
mongo::CollectionInfoCacheImpl::~CollectionInfoCacheImpl |
( |
| ) |
|
◆ addedIndex()
void mongo::CollectionInfoCacheImpl::addedIndex |
( |
OperationContext * |
opCtx, |
|
|
const IndexDescriptor * |
desc |
|
) |
| |
|
virtual |
Register a newly-created index with the cache.
Must be called whenever an index is built on the associated collection.
Must be called under exclusive collection lock.
Implements mongo::CollectionInfoCache::Impl.
◆ clearQueryCache()
void mongo::CollectionInfoCacheImpl::clearQueryCache |
( |
| ) |
|
|
virtual |
◆ computeIndexKeys()
void mongo::CollectionInfoCacheImpl::computeIndexKeys |
( |
OperationContext * |
opCtx | ) |
|
|
private |
◆ droppedIndex()
void mongo::CollectionInfoCacheImpl::droppedIndex |
( |
OperationContext * |
opCtx, |
|
|
StringData |
indexName |
|
) |
| |
|
virtual |
Deregister a newly-dropped index with the cache.
Must be called whenever an index is dropped on the associated collection.
Must be called under exclusive collection lock.
Implements mongo::CollectionInfoCache::Impl.
◆ getIndexKeys()
const UpdateIndexData & mongo::CollectionInfoCacheImpl::getIndexKeys |
( |
OperationContext * |
opCtx | ) |
const |
|
virtual |
◆ getIndexUsageStats()
CollectionIndexUsageMap mongo::CollectionInfoCacheImpl::getIndexUsageStats |
( |
| ) |
const |
|
virtual |
Returns cached index usage statistics for this collection.
The map returned will contain entry for each index in the collection along with both a usage counter and a timestamp representing the date/time the counter is valid from.
Note for performance that this method returns a copy of a StringMap.
Implements mongo::CollectionInfoCache::Impl.
◆ getPlanCache()
PlanCache * mongo::CollectionInfoCacheImpl::getPlanCache |
( |
| ) |
const |
|
virtual |
◆ getQuerySettings()
QuerySettings * mongo::CollectionInfoCacheImpl::getQuerySettings |
( |
| ) |
const |
|
virtual |
◆ init()
void mongo::CollectionInfoCacheImpl::init |
( |
OperationContext * |
opCtx | ) |
|
|
virtual |
◆ notifyOfQuery()
void mongo::CollectionInfoCacheImpl::notifyOfQuery |
( |
OperationContext * |
opCtx, |
|
|
const std::set< std::string > & |
indexesUsed |
|
) |
| |
|
virtual |
Signal to the cache that a query operation has completed.
'indexesUsed' should list the set of indexes used by the winning plan, if any.
Implements mongo::CollectionInfoCache::Impl.
◆ rebuildIndexData()
void mongo::CollectionInfoCacheImpl::rebuildIndexData |
( |
OperationContext * |
opCtx | ) |
|
|
private |
Rebuilds cached information that is dependent on index composition.
Must be called when index composition changes.
◆ updatePlanCacheIndexEntries()
void mongo::CollectionInfoCacheImpl::updatePlanCacheIndexEntries |
( |
OperationContext * |
opCtx | ) |
|
|
private |
◆ _collection
Collection* mongo::CollectionInfoCacheImpl::_collection |
|
private |
◆ _hasTTLIndex
bool mongo::CollectionInfoCacheImpl::_hasTTLIndex = false |
|
private |
◆ _indexedPaths
UpdateIndexData mongo::CollectionInfoCacheImpl::_indexedPaths |
|
private |
◆ _indexUsageTracker
CollectionIndexUsageTracker mongo::CollectionInfoCacheImpl::_indexUsageTracker |
|
private |
◆ _keysComputed
bool mongo::CollectionInfoCacheImpl::_keysComputed |
|
private |
◆ _ns
const NamespaceString mongo::CollectionInfoCacheImpl::_ns |
|
private |
◆ _planCache
std::unique_ptr<PlanCache> mongo::CollectionInfoCacheImpl::_planCache |
|
private |
◆ _querySettings
std::unique_ptr<QuerySettings> mongo::CollectionInfoCacheImpl::_querySettings |
|
private |
The documentation for this class was generated from the following files: