summaryrefslogtreecommitdiff
path: root/src/mongo/db/cloner.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-05-30 16:01:52 -0400
committerEliot Horowitz <eliot@10gen.com>2012-06-03 00:06:40 -0400
commit52bb10b65be3f618d94d1e9b127b829afaa20e7f (patch)
tree6a78e6a56d4e976c2f6328feef2cc8e46228fe39 /src/mongo/db/cloner.h
parent24f8f39c669437692e247c152e553a278c1b878d (diff)
downloadmongo-52bb10b65be3f618d94d1e9b127b829afaa20e7f.tar.gz
make cloner options/api cleaner before adding more
Diffstat (limited to 'src/mongo/db/cloner.h')
-rw-r--r--src/mongo/db/cloner.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mongo/db/cloner.h b/src/mongo/db/cloner.h
index 130fea0fac1..382a58963a2 100644
--- a/src/mongo/db/cloner.h
+++ b/src/mongo/db/cloner.h
@@ -21,6 +21,37 @@
#include "jsobj.h"
namespace mongo {
+
+ struct CloneOptions {
+
+ CloneOptions() {
+ logForRepl = true;
+ slaveOk = false;
+ useReplAuth = false;
+ snapshot = true;
+ mayYield = true;
+ mayBeInterrupted = false;
+
+ syncData = true;
+ syncIndexes = true;
+ }
+
+ string fromDB;
+ set<string> collsToIgnore;
+
+ bool logForRepl;
+ bool slaveOk;
+ bool useReplAuth;
+ bool snapshot;
+ bool mayYield;
+ bool mayBeInterrupted;
+ };
+
+ bool cloneFrom( const string& masterHost ,
+ const CloneOptions& options ,
+ string& errmsg /* out */ ,
+ int* errCode = 0 /* out */ ,
+ set<string>* clonedCollections = 0 /* out */ );
/**
* @param slaveOk - if true it is ok if the source of the data is !ismaster.