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.h>
this is for storing things that you want to cache about a single collection life cycle is managed for you from inside Collection.
◆ CollectionInfoCache()
mongo::CollectionInfoCache::CollectionInfoCache |
( |
Collection *const |
collection, |
|
|
const NamespaceString & |
ns |
|
) |
| |
|
inlineexplicit |
◆ ~CollectionInfoCache()
mongo::CollectionInfoCache::~CollectionInfoCache |
( |
| ) |
|
|
inlinedefault |
◆ _impl() [1/2]
const Impl& mongo::CollectionInfoCache::_impl |
( |
| ) |
const |
|
inline |
◆ _impl() [2/2]
Impl& mongo::CollectionInfoCache::_impl |
( |
| ) |
|
|
inline |
◆ addedIndex()
void mongo::CollectionInfoCache::addedIndex |
( |
OperationContext *const |
opCtx, |
|
|
const IndexDescriptor *const |
desc |
|
) |
| |
|
inline |
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.
◆ clearQueryCache()
void mongo::CollectionInfoCache::clearQueryCache |
( |
| ) |
|
|
inline |
Removes all cached query plans.
◆ droppedIndex()
void mongo::CollectionInfoCache::droppedIndex |
( |
OperationContext *const |
opCtx, |
|
|
const StringData |
indexName |
|
) |
| |
|
inline |
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.
◆ getIndexKeys()
const UpdateIndexData& mongo::CollectionInfoCache::getIndexKeys |
( |
OperationContext *const |
opCtx | ) |
const |
|
inline |
◆ getIndexUsageStats()
CollectionIndexUsageMap mongo::CollectionInfoCache::getIndexUsageStats |
( |
| ) |
const |
|
inline |
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.
◆ getPlanCache()
PlanCache* mongo::CollectionInfoCache::getPlanCache |
( |
| ) |
const |
|
inline |
Get the PlanCache for this collection.
◆ getQuerySettings()
QuerySettings* mongo::CollectionInfoCache::getQuerySettings |
( |
| ) |
const |
|
inline |
Get the QuerySettings for this collection.
◆ init()
void mongo::CollectionInfoCache::init |
( |
OperationContext *const |
opCtx | ) |
|
|
inline |
◆ MONGO_DECLARE_SHIM()
◆ notifyOfQuery()
void mongo::CollectionInfoCache::notifyOfQuery |
( |
OperationContext *const |
opCtx, |
|
|
const std::set< std::string > & |
indexesUsed |
|
) |
| |
|
inline |
Signal to the cache that a query operation has completed.
'indexesUsed' should list the set of indexes used by the winning plan, if any.
◆ _pimpl
std::unique_ptr<Impl> mongo::CollectionInfoCache::_pimpl |
The documentation for this class was generated from the following file: