X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDistributedDataStoreFactory.java;h=a1a3e87510e78d151b769fd579c2602503ec656c;hb=efbeac00372d85440d46e2e5e04b124036ad3721;hp=907b856c075e3525ad89bb7261f8462c39e0792f;hpb=9340a64d067473032111bd8c3341ea6855cd9e4a;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java index 907b856c07..a1a3e87510 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java @@ -9,16 +9,22 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorSystem; + +import org.opendaylight.controller.cluster.datastore.shardstrategy.ShardStrategyFactory; +import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties; import org.opendaylight.controller.sal.core.api.model.SchemaService; public class DistributedDataStoreFactory { - public static DistributedDataStore createInstance(String name, SchemaService schemaService){ + public static DistributedDataStore createInstance(String name, SchemaService schemaService, + InMemoryDOMDataStoreConfigProperties dataStoreProperties) { + ActorSystem actorSystem = ActorSystemFactory.getInstance(); + Configuration config = new ConfigurationImpl("module-shards.conf", "modules.conf"); final DistributedDataStore dataStore = - new DistributedDataStore(actorSystem, name, new ClusterWrapperImpl(actorSystem), new ConfigurationImpl("module-shards.conf", "modules.conf")); - schemaService - .registerSchemaServiceListener(dataStore); + new DistributedDataStore(actorSystem, name, new ClusterWrapperImpl(actorSystem), + config, dataStoreProperties ); + ShardStrategyFactory.setConfiguration(config); + schemaService.registerSchemaContextListener(dataStore); return dataStore; - } }