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%2Fcluster%2Fdatastore%2FDistributedDataStore.java;h=198c3b2edaa137e6a2b6c5d32d14a1b00798106b;hp=d31217042aa7f65e801b6a1d7dbc82d89e47ccbc;hb=55160e3ebfd26f9bf0ee53c0487dbdcb3a18d8ed;hpb=a46305fbc6bb7ec6883c21298d356a5e4fbbb015 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java index d31217042a..198c3b2eda 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java @@ -20,6 +20,7 @@ import org.opendaylight.controller.cluster.datastore.identifiers.ShardManagerIde import org.opendaylight.controller.cluster.datastore.jmx.mbeans.DatastoreConfigurationMXBeanImpl; import org.opendaylight.controller.cluster.datastore.jmx.mbeans.DatastoreInfoMXBeanImpl; import org.opendaylight.controller.cluster.datastore.messages.DatastoreSnapshot; +import org.opendaylight.controller.cluster.datastore.shardmanager.ShardManagerCreator; import org.opendaylight.controller.cluster.datastore.utils.ActorContext; import org.opendaylight.controller.cluster.datastore.utils.Dispatchers; import org.opendaylight.controller.cluster.datastore.utils.PrimaryShardInfoFutureCache; @@ -85,11 +86,11 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, PrimaryShardInfoFutureCache primaryShardInfoCache = new PrimaryShardInfoFutureCache(); - ShardManager.Builder builder = ShardManager.builder().cluster(cluster).configuration(configuration). + ShardManagerCreator creator = new ShardManagerCreator().cluster(cluster).configuration(configuration). datastoreContextFactory(datastoreContextFactory).waitTillReadyCountdownLatch(waitTillReadyCountDownLatch). primaryShardInfoCache(primaryShardInfoCache).restoreFromSnapshot(restoreFromSnapshot); - actorContext = new ActorContext(actorSystem, createShardManager(actorSystem, builder, shardDispatcher, + actorContext = new ActorContext(actorSystem, createShardManager(actorSystem, creator, shardDispatcher, shardManagerId), cluster, configuration, datastoreContextFactory.getBaseDatastoreContext(), primaryShardInfoCache); this.waitTillReadyTimeInMillis = @@ -232,13 +233,13 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, } } - private static ActorRef createShardManager(ActorSystem actorSystem, ShardManager.Builder builder, + private static ActorRef createShardManager(ActorSystem actorSystem, ShardManagerCreator creator, String shardDispatcher, String shardManagerId) { Exception lastException = null; for(int i=0;i<100;i++) { try { - return actorSystem.actorOf(builder.props().withDispatcher(shardDispatcher).withMailbox( + return actorSystem.actorOf(creator.props().withDispatcher(shardDispatcher).withMailbox( ActorContext.BOUNDED_MAILBOX), shardManagerId); } catch (Exception e){ lastException = e;