Refactor DOMDataBrokerImpl
[controller.git] / opendaylight / md-sal / benchmark-data-store / src / main / java / org / opendaylight / controller / md / sal / dom / store / benchmark / InMemoryBrokerWriteTransactionBenchmark.java
index a46a6d1e79a21fc6b1811b762f11d0ec41515148..e6a16427037f39a5130252a6286490391049f9fc 100644 (file)
@@ -15,7 +15,7 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.dom.broker.impl.DOMDataBrokerImpl;
+import org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
 import org.opendaylight.controller.sal.core.spi.data.DOMStore;
 import org.openjdk.jmh.annotations.BenchmarkMode;
@@ -41,15 +41,13 @@ public class InMemoryBrokerWriteTransactionBenchmark extends AbstractInMemoryBro
         executor = MoreExecutors.listeningDecorator(
             MoreExecutors.getExitingExecutorService((ThreadPoolExecutor)Executors.newFixedThreadPool(1), 1L, TimeUnit.SECONDS));
 
-        InMemoryDOMDataStore operStore = new InMemoryDOMDataStore("OPER", dsExec,
-            MoreExecutors.sameThreadExecutor());
-        InMemoryDOMDataStore configStore = new InMemoryDOMDataStore("CFG", dsExec,
-            MoreExecutors.sameThreadExecutor());
+        InMemoryDOMDataStore operStore = new InMemoryDOMDataStore("OPER", dsExec);
+        InMemoryDOMDataStore configStore = new InMemoryDOMDataStore("CFG", dsExec);
         Map<LogicalDatastoreType, DOMStore> datastores = ImmutableMap.of(
             LogicalDatastoreType.OPERATIONAL, (DOMStore)operStore,
             LogicalDatastoreType.CONFIGURATION, configStore);
 
-        domBroker = new DOMDataBrokerImpl(datastores, executor);
+        domBroker = new SerializedDOMDataBroker(datastores, executor);
         schemaContext = BenchmarkModel.createTestContext();
         configStore.onGlobalContextUpdated(schemaContext);
         operStore.onGlobalContextUpdated(schemaContext);