diff options
Diffstat (limited to 'src/mongo/db/catalog/collection_info_cache_impl.cpp')
-rw-r--r-- | src/mongo/db/catalog/collection_info_cache_impl.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/db/catalog/collection_info_cache_impl.cpp b/src/mongo/db/catalog/collection_info_cache_impl.cpp index d23da8c5a81..b3366f70ae2 100644 --- a/src/mongo/db/catalog/collection_info_cache_impl.cpp +++ b/src/mongo/db/catalog/collection_info_cache_impl.cpp @@ -49,11 +49,15 @@ #include "mongo/util/log.h" namespace mongo { -MONGO_REGISTER_SHIM(CollectionInfoCache::makeImpl) -(Collection* const collection, const NamespaceString& ns, PrivateTo<CollectionInfoCache>) - ->std::unique_ptr<CollectionInfoCache::Impl> { - return std::make_unique<CollectionInfoCacheImpl>(collection, ns); +namespace { +MONGO_INITIALIZER(InitializeCollectionInfoCacheFactory)(InitializerContext* const) { + CollectionInfoCache::registerFactory( + [](Collection* const collection, const NamespaceString& ns) { + return stdx::make_unique<CollectionInfoCacheImpl>(collection, ns); + }); + return Status::OK(); } +} // namespace CollectionInfoCacheImpl::CollectionInfoCacheImpl(Collection* collection, const NamespaceString& ns) : _collection(collection), |