summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/collection_info_cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/collection_info_cache.cpp')
-rw-r--r--src/mongo/db/catalog/collection_info_cache.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/collection_info_cache.cpp b/src/mongo/db/catalog/collection_info_cache.cpp
index 0a36bb07448..4bd1e4715f7 100644
--- a/src/mongo/db/catalog/collection_info_cache.cpp
+++ b/src/mongo/db/catalog/collection_info_cache.cpp
@@ -33,9 +33,20 @@
#include "mongo/db/catalog/collection_info_cache.h"
namespace mongo {
+namespace {
+stdx::function<CollectionInfoCache::factory_function_type> factory;
+} // namespace
+
CollectionInfoCache::Impl::~Impl() = default;
-MONGO_DEFINE_SHIM(CollectionInfoCache::makeImpl);
+void CollectionInfoCache::registerFactory(decltype(factory) newFactory) {
+ factory = std::move(newFactory);
+}
+
+auto CollectionInfoCache::makeImpl(Collection* const collection, const NamespaceString& ns)
+ -> std::unique_ptr<Impl> {
+ return factory(collection, ns);
+}
void CollectionInfoCache::TUHook::hook() noexcept {}
} // namespace mongo