CDS should use MD-SAL InMemoryDOMDataStoreConfigProperties 92/71592/6
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 30 Apr 2018 16:24:13 +0000 (18:24 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 16 May 2018 08:36:52 +0000 (10:36 +0200)
This moves CDS's use of InMemoryDOMDataStoreConfigProperties from
controller's IMDS to MDSAL's IMDS -- eliminating all dependencies
between the two.

Change-Id: Id68f86ac5f1cccdb29f706b3a0bc63ae5a4987fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContext.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextTest.java

index 764cd357e5c4afae5c90c70120e4efd959c12c1a..6584b8d5b85eae434a515943c798980275d5daed 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
  * 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.controller.cluster.datastore;
 
 import akka.util.Timeout;
 package org.opendaylight.controller.cluster.datastore;
 
 import akka.util.Timeout;
@@ -22,8 +21,8 @@ import org.opendaylight.controller.cluster.common.actor.FileAkkaConfigurationRea
 import org.opendaylight.controller.cluster.raft.ConfigParams;
 import org.opendaylight.controller.cluster.raft.DefaultConfigParamsImpl;
 import org.opendaylight.controller.cluster.raft.PeerAddressResolver;
 import org.opendaylight.controller.cluster.raft.ConfigParams;
 import org.opendaylight.controller.cluster.raft.DefaultConfigParamsImpl;
 import org.opendaylight.controller.cluster.raft.PeerAddressResolver;
-import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataStoreConfigProperties;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -616,9 +615,12 @@ public class DatastoreContext implements ClientActorConfig {
 
         @Override
         public DatastoreContext build() {
 
         @Override
         public DatastoreContext build() {
-            datastoreContext.dataStoreProperties = InMemoryDOMDataStoreConfigProperties.create(
-                    maxShardDataChangeExecutorPoolSize, maxShardDataChangeExecutorQueueSize,
-                    maxShardDataChangeListenerQueueSize, maxShardDataStoreExecutorQueueSize);
+            datastoreContext.dataStoreProperties = InMemoryDOMDataStoreConfigProperties.builder()
+                    .maxDataChangeExecutorPoolSize(maxShardDataChangeExecutorPoolSize)
+                    .maxDataChangeExecutorQueueSize(maxShardDataChangeExecutorQueueSize)
+                    .maxDataChangeListenerQueueSize(maxShardDataChangeListenerQueueSize)
+                    .maxDataStoreExecutorQueueSize(maxShardDataStoreExecutorQueueSize)
+                    .build();
 
             if (datastoreContext.dataStoreName != null) {
                 GLOBAL_DATASTORE_NAMES.add(datastoreContext.dataStoreName);
 
             if (datastoreContext.dataStoreName != null) {
                 GLOBAL_DATASTORE_NAMES.add(datastoreContext.dataStoreName);
index a735f26b4fe6e798145f746e0f38c3378c289c3c..5d5d2f8db23ede151123bd1be66ef722c009ea59 100644 (file)
@@ -19,8 +19,8 @@ import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
 import org.junit.Test;
 import java.util.Hashtable;
 import java.util.Map;
 import org.junit.Test;
-import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataStoreConfigProperties;
 
 /**
  * Unit tests for DatastoreContextIntrospector.
 
 /**
  * Unit tests for DatastoreContextIntrospector.
index dd117add08d823bd6086ae1395447747bfc0872b..c0776229e21f5abde10c64f42b5481a46d3f841a 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
  * 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.controller.cluster.datastore;
 
 import static org.junit.Assert.assertEquals;
 package org.opendaylight.controller.cluster.datastore;
 
 import static org.junit.Assert.assertEquals;
@@ -30,7 +29,7 @@ import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEF
 import java.util.concurrent.TimeUnit;
 import org.junit.Assert;
 import org.junit.Test;
 import java.util.concurrent.TimeUnit;
 import org.junit.Assert;
 import org.junit.Test;
-import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties;
+import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataStoreConfigProperties;
 
 public class DatastoreContextTest {
 
 
 public class DatastoreContextTest {