Use merging transaction chains in dsbenchmark
[controller.git] / benchmark / dsbenchmark / src / main / java / org / opendaylight / dsbenchmark / DatastoreAbstractWriter.java
index 20024e455eb2448267d04bfabc8b9a8a8b240c24..50eb0d4e8bbafab7c1723a6ba5a6234a862ef395 100644 (file)
@@ -5,12 +5,10 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.dsbenchmark;
 
 import java.util.Random;
-
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 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.slf4j.Logger;
@@ -26,22 +24,21 @@ public abstract class DatastoreAbstractWriter {
     protected final StartTestInput.DataStore dataStore;
     protected final Random rn = new Random();
 
-
     protected int txOk = 0;
     protected int txError = 0;
 
-
-    public DatastoreAbstractWriter(StartTestInput.Operation oper,
-                                   int outerListElem, int innerListElem, long writesPerTx, DataStore dataStore) {
+    public DatastoreAbstractWriter(final StartTestInput.Operation oper,
+            final int outerListElem, final int innerListElem, final long writesPerTx, final DataStore dataStore) {
         this.outerListElem = outerListElem;
         this.innerListElem = innerListElem;
         this.writesPerTx = writesPerTx;
         this.oper = oper;
         this.dataStore = dataStore;
-        LOG.info("DatastoreAbstractWriter created: {}", this);
+        LOG.debug("DatastoreAbstractWriter created: {}", this);
     }
 
     public abstract void createList();
+
     public abstract void executeList();
 
     public int getTxError() {
@@ -56,12 +53,9 @@ public abstract class DatastoreAbstractWriter {
         final LogicalDatastoreType dsType;
         if (dataStore == DataStore.CONFIG) {
             dsType = LogicalDatastoreType.CONFIGURATION;
-        }
-        else if (dataStore == DataStore.OPERATIONAL) {
+        } else if (dataStore == DataStore.OPERATIONAL) {
             dsType = LogicalDatastoreType.OPERATIONAL;
-        }
-        else
-        {
+        } else {
             if (rn.nextBoolean() == true) {
                 dsType = LogicalDatastoreType.OPERATIONAL;
             } else {