summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/collection_info_cache.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 00:22:50 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 10:56:02 -0400
commit9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch)
tree3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/db/catalog/collection_info_cache.h
parent01965cf52bce6976637ecb8f4a622aeb05ab256a (diff)
downloadmongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/db/catalog/collection_info_cache.h')
-rw-r--r--src/mongo/db/catalog/collection_info_cache.h108
1 files changed, 54 insertions, 54 deletions
diff --git a/src/mongo/db/catalog/collection_info_cache.h b/src/mongo/db/catalog/collection_info_cache.h
index 294f371eef0..7e418b4e123 100644
--- a/src/mongo/db/catalog/collection_info_cache.h
+++ b/src/mongo/db/catalog/collection_info_cache.h
@@ -37,76 +37,76 @@
namespace mongo {
- class Collection;
+class Collection;
- /**
- * this is for storing things that you want to cache about a single collection
- * life cycle is managed for you from inside Collection
+/**
+ * this is for storing things that you want to cache about a single collection
+ * life cycle is managed for you from inside Collection
+ */
+class CollectionInfoCache {
+public:
+ CollectionInfoCache(Collection* collection);
+
+ /*
+ * Resets entire cache state. Must be called under exclusive DB lock.
*/
- class CollectionInfoCache {
- public:
-
- CollectionInfoCache( Collection* collection );
-
- /*
- * Resets entire cache state. Must be called under exclusive DB lock.
- */
- void reset( OperationContext* txn );
+ void reset(OperationContext* txn);
- //
- // New Query Execution
- //
+ //
+ // New Query Execution
+ //
- /**
- * Get the PlanCache for this collection.
- */
- PlanCache* getPlanCache() const;
-
- /**
- * Get the QuerySettings for this collection.
- */
- QuerySettings* getQuerySettings() const;
+ /**
+ * Get the PlanCache for this collection.
+ */
+ PlanCache* getPlanCache() const;
- // -------------------
+ /**
+ * Get the QuerySettings for this collection.
+ */
+ QuerySettings* getQuerySettings() const;
- /* get set of index keys for this namespace. handy to quickly check if a given
- field is indexed (Note it might be a secondary component of a compound index.)
- */
- const UpdateIndexData& indexKeys( OperationContext* txn ) const;
+ // -------------------
- // ---------------------
+ /* get set of index keys for this namespace. handy to quickly check if a given
+ field is indexed (Note it might be a secondary component of a compound index.)
+ */
+ const UpdateIndexData& indexKeys(OperationContext* txn) const;
- /**
- * Called when an index is added to this collection.
- */
- void addedIndex( OperationContext* txn ) { reset( txn ); }
+ // ---------------------
- void clearQueryCache();
+ /**
+ * Called when an index is added to this collection.
+ */
+ void addedIndex(OperationContext* txn) {
+ reset(txn);
+ }
- /* you must notify the cache if you are doing writes, as query plan utility will change */
- void notifyOfWriteOp();
+ void clearQueryCache();
- private:
+ /* you must notify the cache if you are doing writes, as query plan utility will change */
+ void notifyOfWriteOp();
- Collection* _collection; // not owned
+private:
+ Collection* _collection; // not owned
- // --- index keys cache
- bool _keysComputed;
- UpdateIndexData _indexedPaths;
+ // --- index keys cache
+ bool _keysComputed;
+ UpdateIndexData _indexedPaths;
- // A cache for query plans.
- std::unique_ptr<PlanCache> _planCache;
+ // A cache for query plans.
+ std::unique_ptr<PlanCache> _planCache;
- // Query settings.
- // Includes index filters.
- std::unique_ptr<QuerySettings> _querySettings;
+ // Query settings.
+ // Includes index filters.
+ std::unique_ptr<QuerySettings> _querySettings;
- /**
- * Must be called under exclusive DB lock.
- */
- void computeIndexKeys( OperationContext* txn );
+ /**
+ * Must be called under exclusive DB lock.
+ */
+ void computeIndexKeys(OperationContext* txn);
- void updatePlanCacheIndexEntries( OperationContext* txn );
- };
+ void updatePlanCacheIndexEntries(OperationContext* txn);
+};
} // namespace mongo