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=75e45b1d4f856b6036674096409d39d72fb51c8b;hp=de33f55b96b6a840a8d8fa36dfe5f29aa1195660;hb=dc5eceede07e499e5c5e0ab60d7ce42bc596fcc0;hpb=531621aac4cff9d39cbd8668a53bdeba8a0e6d81 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 de33f55b96..75e45b1d4f 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,12 +1,10 @@ package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; import java.util.concurrent.TimeUnit; - import org.opendaylight.controller.cluster.datastore.DatastoreContext; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory; import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties; import org.osgi.framework.BundleContext; - import scala.concurrent.duration.Duration; public class DistributedConfigDataStoreProviderModule extends @@ -41,7 +39,7 @@ public class DistributedConfigDataStoreProviderModule extends } DatastoreContext datastoreContext = DatastoreContext.newBuilder() - .dataStoreMXBeanType("DistributedConfigDatastore") + .dataStoreType("config") .dataStoreProperties(InMemoryDOMDataStoreConfigProperties.create( props.getMaxShardDataChangeExecutorPoolSize().getValue().intValue(), props.getMaxShardDataChangeExecutorQueueSize().getValue().intValue(), @@ -53,14 +51,25 @@ public class DistributedConfigDataStoreProviderModule extends .shardJournalRecoveryLogBatchSize(props.getShardJournalRecoveryLogBatchSize(). getValue().intValue()) .shardSnapshotBatchCount(props.getShardSnapshotBatchCount().getValue().intValue()) + .shardSnapshotDataThresholdPercentage(props.getShardSnapshotDataThresholdPercentage().getValue().intValue()) .shardHeartbeatIntervalInMillis(props.getShardHearbeatIntervalInMillis().getValue()) + .shardInitializationTimeout(props.getShardInitializationTimeoutInSeconds().getValue(), + TimeUnit.SECONDS) + .shardLeaderElectionTimeout(props.getShardLeaderElectionTimeoutInSeconds().getValue(), + TimeUnit.SECONDS) .shardTransactionCommitTimeoutInSeconds( props.getShardTransactionCommitTimeoutInSeconds().getValue().intValue()) .shardTransactionCommitQueueCapacity( props.getShardTransactionCommitQueueCapacity().getValue().intValue()) + .persistent(props.getPersistent().booleanValue()) + .shardIsolatedLeaderCheckIntervalInMillis( + props.getShardIsolatedLeaderCheckIntervalInMillis().getValue()) + .shardElectionTimeoutFactor(props.getShardElectionTimeoutFactor().getValue()) + .transactionCreationInitialRateLimit(props.getTxCreationInitialRateLimit().getValue()) + .shardBatchedModificationCount(props.getShardBatchedModificationCount().getValue().intValue()) .build(); - return DistributedDataStoreFactory.createInstance("config", getConfigSchemaServiceDependency(), + return DistributedDataStoreFactory.createInstance(getConfigSchemaServiceDependency(), datastoreContext, bundleContext); }