summaryrefslogtreecommitdiff
path: root/src/mongo/db/cursor_manager.h
diff options
context:
space:
mode:
authorAnton Korshunov <anton.korshunov@mongodb.com>2019-02-07 11:34:26 +0000
committerAnton Korshunov <anton.korshunov@mongodb.com>2019-02-11 15:55:15 +0000
commitb54d9905a167867a2655910799573378aff2ce89 (patch)
treee11c129d50e07c288d08a04963068164d7174c05 /src/mongo/db/cursor_manager.h
parent80f9a13324fc36b2deb400e5a185968f6fa8f64a (diff)
downloadmongo-b54d9905a167867a2655910799573378aff2ce89.tar.gz
SERVER-37456 Make the global CursorManager a decoration on ServiceContext
Diffstat (limited to 'src/mongo/db/cursor_manager.h')
-rw-r--r--src/mongo/db/cursor_manager.h15
1 files changed, 13 insertions, 2 deletions
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<CursorManager> newCursorManager);
+
CursorManager();