X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fmd%2Fsal%2Fdom%2Fimpl%2FDomInmemoryDataBrokerModule.java;h=667c0fc2826a100b2fc6ae77f4c0344a52d723f6;hb=9c3a7d1aa13908ee5f0be33b63dfd2467af551be;hp=d3852d28c5ba1ff9d6191f135cbcaba0c88ad2b4;hpb=b1e455ac4685602b7b3290192906c607d2c92c71;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java index d3852d28c5..667c0fc282 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java @@ -7,18 +7,16 @@ */ package org.opendaylight.controller.config.yang.md.sal.dom.impl; -import com.google.common.collect.ImmutableMap; -import com.google.common.util.concurrent.ListeningExecutorService; -import com.google.common.util.concurrent.MoreExecutors; +import java.util.concurrent.Executors; + import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; import org.opendaylight.controller.md.sal.dom.broker.impl.DOMDataBrokerImpl; import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore; import org.opendaylight.controller.sal.core.spi.data.DOMStore; -import org.osgi.framework.BundleContext; -import java.util.Hashtable; -import java.util.concurrent.Executors; +import com.google.common.collect.ImmutableMap; +import com.google.common.util.concurrent.ListeningExecutorService; +import com.google.common.util.concurrent.MoreExecutors; /** * @@ -26,8 +24,6 @@ import java.util.concurrent.Executors; public final class DomInmemoryDataBrokerModule extends org.opendaylight.controller.config.yang.md.sal.dom.impl.AbstractDomInmemoryDataBrokerModule { - private BundleContext bundleContext; - public DomInmemoryDataBrokerModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { super(identifier, dependencyResolver); @@ -54,7 +50,7 @@ public final class DomInmemoryDataBrokerModule extends //we will default to InMemoryDOMDataStore creation operStore = new InMemoryDOMDataStore("DOM-OPER", storeExecutor); //here we will register the SchemaContext listener - getSchemaServiceDependency().registerSchemaServiceListener((InMemoryDOMDataStore)operStore); + getSchemaServiceDependency().registerSchemaContextListener((InMemoryDOMDataStore)operStore); } DOMStore configStore = getConfigDataStoreDependency(); @@ -62,7 +58,7 @@ public final class DomInmemoryDataBrokerModule extends //we will default to InMemoryDOMDataStore creation configStore = new InMemoryDOMDataStore("DOM-CFG", storeExecutor); //here we will register the SchemaContext listener - getSchemaServiceDependency().registerSchemaServiceListener((InMemoryDOMDataStore)configStore); + getSchemaServiceDependency().registerSchemaContextListener((InMemoryDOMDataStore)configStore); } ImmutableMap datastores = ImmutableMap . builder().put(LogicalDatastoreType.OPERATIONAL, operStore) @@ -70,17 +66,6 @@ public final class DomInmemoryDataBrokerModule extends DOMDataBrokerImpl newDataBroker = new DOMDataBrokerImpl(datastores, MoreExecutors.listeningDecorator(Executors.newSingleThreadExecutor())); - getBundleContext().registerService(DOMDataBroker.class, newDataBroker, new Hashtable()); - - return newDataBroker; } - - private BundleContext getBundleContext() { - return bundleContext; - } - - void setBundleContext(final BundleContext ctx) { - bundleContext = ctx; - } }