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%2Fconfig%2Fyang%2Fconfig%2Fdistributed_datastore_provider%2FDistributedConfigDataStoreProviderModule.java;h=a675b40718a7f91f85553caf53c26df24f01d9ef;hb=refs%2Fchanges%2F15%2F12215%2F7;hp=84614bd7bb43a0bbf43f3fe055673f64fe2cd10d;hpb=32633beca367fea1db194d310e286b14acc0e6a6;p=controller.git 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 84614bd7bb..a675b40718 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 @@ -40,18 +40,29 @@ public class DistributedConfigDataStoreProviderModule extends props = new ConfigProperties(); } - DatastoreContext datastoreContext = new DatastoreContext("DistributedConfigDatastore", - InMemoryDOMDataStoreConfigProperties.create( + DatastoreContext datastoreContext = DatastoreContext.newBuilder() + .dataStoreMXBeanType("DistributedConfigDatastore") + .dataStoreProperties(InMemoryDOMDataStoreConfigProperties.create( props.getMaxShardDataChangeExecutorPoolSize().getValue().intValue(), props.getMaxShardDataChangeExecutorQueueSize().getValue().intValue(), props.getMaxShardDataChangeListenerQueueSize().getValue().intValue(), - props.getMaxShardDataStoreExecutorQueueSize().getValue().intValue()), - Duration.create(props.getShardTransactionIdleTimeoutInMinutes().getValue(), - TimeUnit.MINUTES), - props.getOperationTimeoutInSeconds().getValue(), - props.getShardJournalRecoveryLogBatchSize().getValue().intValue(), - props.getShardSnapshotBatchCount().getValue().intValue(), - props.getShardHearbeatIntervalInMillis().getValue()); + props.getMaxShardDataStoreExecutorQueueSize().getValue().intValue())) + .shardTransactionIdleTimeout(Duration.create( + props.getShardTransactionIdleTimeoutInMinutes().getValue(), TimeUnit.MINUTES)) + .operationTimeoutInSeconds(props.getOperationTimeoutInSeconds().getValue()) + .shardJournalRecoveryLogBatchSize(props.getShardJournalRecoveryLogBatchSize(). + getValue().intValue()) + .shardSnapshotBatchCount(props.getShardSnapshotBatchCount().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()) + .build(); return DistributedDataStoreFactory.createInstance("config", getConfigSchemaServiceDependency(), datastoreContext, bundleContext);