summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/pipeline_d.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2014-01-30 18:44:34 -0500
committerMathias Stearn <mathias@10gen.com>2014-02-12 11:39:35 -0500
commit6244c5e5ef1a285ea0a6a28a411caa41a2691197 (patch)
tree944ea64542f67273afbcd16307b874eceebe5e3b /src/mongo/db/pipeline/pipeline_d.h
parent20806b5757b5bf4dbf524df0f332170012086af7 (diff)
downloadmongo-6244c5e5ef1a285ea0a6a28a411caa41a2691197.tar.gz
SERVER-12530 Make DocumentSourceCursor use Runner directly
Now that the input Runner no longer is wrapped in a ClientCursor, the PipelineRunner is responsible for propagating kill and invalidate methods.
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_d.h')
-rw-r--r--src/mongo/db/pipeline/pipeline_d.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/pipeline_d.h b/src/mongo/db/pipeline/pipeline_d.h
index 33cc6af35fa..98ea7537be3 100644
--- a/src/mongo/db/pipeline/pipeline_d.h
+++ b/src/mongo/db/pipeline/pipeline_d.h
@@ -28,13 +28,14 @@
#pragma once
-#include "mongo/pch.h"
+#include <boost/smart_ptr.hpp>
namespace mongo {
class Collection;
class DocumentSourceCursor;
struct ExpressionContext;
class Pipeline;
+ class Runner;
/*
PipelineD is an extension of the Pipeline class, but with additional
@@ -63,14 +64,15 @@ namespace mongo {
*
* Must have a ReadContext before entering.
*
+ * If the returned Runner is non-null, you are responsible for ensuring
+ * it receives appropriate invalidate and kill messages.
+ *
* @param pPipeline the logical "this" for this operation
* @param pExpCtx the expression context for this pipeline
- * @param collection the input collection. NULL if doesn't exist.
*/
- static void prepareCursorSource(
+ static boost::shared_ptr<Runner> prepareCursorSource(
const intrusive_ptr<Pipeline> &pPipeline,
- const intrusive_ptr<ExpressionContext> &pExpCtx,
- Collection* collection);
+ const intrusive_ptr<ExpressionContext> &pExpCtx);
private:
PipelineD(); // does not exist: prevent instantiation