summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builder.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2013-12-23 14:32:09 -0500
committerEliot Horowitz <eliot@10gen.com>2013-12-28 21:26:53 -0500
commit09be6f838b48ef35ac79d0dd4efbc2a0e7717843 (patch)
treeebeb998d27efea83050a04cb8fd06e4b6aa3fa56 /src/mongo/db/index_builder.h
parent6ef65f8e21454d35febc7b992a6a23c2b98a3ebd (diff)
downloadmongo-09be6f838b48ef35ac79d0dd4efbc2a0e7717843.tar.gz
SERVER-11611: switch index builder and rebuilder to use IndexCatalog
Diffstat (limited to 'src/mongo/db/index_builder.h')
-rw-r--r--src/mongo/db/index_builder.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mongo/db/index_builder.h b/src/mongo/db/index_builder.h
index 5968f2e4680..6c243f2a6f4 100644
--- a/src/mongo/db/index_builder.h
+++ b/src/mongo/db/index_builder.h
@@ -30,6 +30,7 @@
#include <string>
+#include "mongo/db/client.h"
#include "mongo/db/jsobj.h"
#include "mongo/util/background.h"
@@ -40,13 +41,17 @@ namespace mongo {
class IndexBuilder : public BackgroundJob {
public:
- IndexBuilder(const std::string ns, const BSONObj index);
+ IndexBuilder(const BSONObj& index);
virtual ~IndexBuilder();
virtual void run();
+
+ /**
+ * name of the builder, not the index
+ */
virtual std::string name() const;
- void build() const;
+ void build( Client::Context& context ) const;
/**
* Kill all in-progress indexes matching criteria and, optionally, store them in the
@@ -59,12 +64,11 @@ namespace mongo {
* not match the ns field in the indexes list, the BSONObj's ns field is changed before the
* index is built (to handle rename).
*/
- static void restoreIndexes(const std::string& ns, const std::vector<BSONObj>& indexes);
+ static void restoreIndexes(const std::vector<BSONObj>& indexes);
private:
- const std::string _ns;
const BSONObj _index;
- std::string _name;
+ std::string _name; // name of this builder, not related to the index
static AtomicUInt _indexBuildCount;
};