From b54d9905a167867a2655910799573378aff2ce89 Mon Sep 17 00:00:00 2001 From: Anton Korshunov Date: Thu, 7 Feb 2019 11:34:26 +0000 Subject: SERVER-37456 Make the global CursorManager a decoration on ServiceContext --- src/mongo/db/cursor_manager.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/cursor_manager.h') diff --git a/src/mongo/db/cursor_manager.h b/src/mongo/db/cursor_manager.h index f05beb73dc4..0def0d520d1 100644 --- a/src/mongo/db/cursor_manager.h +++ b/src/mongo/db/cursor_manager.h @@ -69,9 +69,20 @@ class PlanExecutor; class CursorManager { public: /** - * Returns a pointer to the process-global cursor manager. + * Returns a pointer to the cursor manager defined within the specified ServiceContext. */ - static CursorManager* getGlobalCursorManager(); + static CursorManager* get(ServiceContext* svcCtx); + + /** + * Returns a pointer to the cursor manager defined within the specified OperationContext. + */ + static CursorManager* get(OperationContext* opCtx); + + /** + * Registers the new cursor manager within the specified ServiceContext. + */ + static void set(ServiceContext* svcCtx, std::unique_ptr newCursorManager); + CursorManager(); -- cgit v1.2.1