Added support for data store type (OPERATIONAL or CONFIG or BOTH)
[controller.git] / benchmark / dsbenchmark / src / main / java / org / opendaylight / dsbenchmark / simpletx / SimpletxDomRead.java
index 98f8c9f7a7daa686b5faa43bd6380c02276a531f..4c0eb02768f771412823e48f215b145b019cbd4f 100644 (file)
@@ -11,12 +11,14 @@ package org.opendaylight.dsbenchmark.simpletx;
 
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.CheckedFuture;
+
 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.dsbenchmark.DatastoreAbstractWriter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.DataStore;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestExec;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.OuterList;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -31,8 +33,8 @@ public class SimpletxDomRead extends DatastoreAbstractWriter {
     private final DOMDataBroker domDataBroker;
 
     public SimpletxDomRead(DOMDataBroker domDataBroker, int outerListElem,
-                           int innerListElem, long writesPerTx) {
-        super(StartTestInput.Operation.DELETE, outerListElem, innerListElem, writesPerTx);
+                           int innerListElem, long writesPerTx, DataStore dataStore) {
+        super(StartTestInput.Operation.DELETE, outerListElem, innerListElem, writesPerTx, dataStore);
         this.domDataBroker = domDataBroker;
         LOG.info("Created simpleTxDomRead");
 
@@ -44,10 +46,11 @@ public class SimpletxDomRead extends DatastoreAbstractWriter {
         // Dump the whole list into the data store in a single transaction
         // with <outerListElem> PUTs on the transaction
         SimpletxDomWrite dd = new SimpletxDomWrite(domDataBroker,
-                StartTestInput.Operation.PUT,
-                outerListElem,
-                innerListElem,
-                outerListElem);
+                                                   StartTestInput.Operation.PUT,
+                                                   outerListElem,
+                                                   innerListElem,
+                                                   outerListElem,
+                                                   dataStore);
         dd.createList();
         dd.executeList();
     }