X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fconfig%2Fdistributed_datastore_provider%2FDistributedConfigDataStoreProviderModule.java;h=e2fbacb46169047764d24f8ba09f087693773d84;hp=592bc49d9e40648a53e6d448666d34c58f2f4184;hb=2dc333588d0c15eb7f2df6223dcdcc15e05b077e;hpb=28ad802448833cad483f185cfe442497ddc5c296;ds=sidebyside diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java index 592bc49d9e..e2fbacb461 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java @@ -1,10 +1,13 @@ package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory; -import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties; +import org.opendaylight.controller.cluster.datastore.DistributedDataStoreProperties; +import org.osgi.framework.BundleContext; public class DistributedConfigDataStoreProviderModule extends org.opendaylight.controller.config.yang.config.distributed_datastore_provider.AbstractDistributedConfigDataStoreProviderModule { + private BundleContext bundleContext; + public DistributedConfigDataStoreProviderModule( org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { @@ -26,10 +29,22 @@ public class DistributedConfigDataStoreProviderModule extends @Override public java.lang.AutoCloseable createInstance() { + + ConfigProperties props = getConfigProperties(); + if(props == null) { + props = new ConfigProperties(); + } + return DistributedDataStoreFactory.createInstance("config", getConfigSchemaServiceDependency(), - InMemoryDOMDataStoreConfigProperties.create(getMaxShardDataChangeExecutorPoolSize(), - getMaxShardDataChangeExecutorQueueSize(), - getMaxShardDataChangeListenerQueueSize())); + new DistributedDataStoreProperties( + props.getMaxShardDataChangeExecutorPoolSize().getValue(), + props.getMaxShardDataChangeExecutorQueueSize().getValue(), + props.getMaxShardDataChangeListenerQueueSize().getValue(), + props.getShardTransactionIdleTimeoutInMinutes().getValue(), + props.getOperationTimeoutInSeconds().getValue()), bundleContext); } + public void setBundleContext(BundleContext bundleContext) { + this.bundleContext = bundleContext; + } }