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=8eb653a44feb54731c840549d54ca24cafacc292;hp=84614bd7bb43a0bbf43f3fe055673f64fe2cd10d;hb=032371baa081315920e52a7806ea09676e47316b;hpb=b3e553ce5b3d3e972cbe19465ab7af2fcb39934c 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..8eb653a44f 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,32 @@ 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()) + .persistent(props.getPersistent().booleanValue()) + .shardIsolatedLeaderCheckIntervalInMillis( + props.getShardIsolatedLeaderCheckIntervalInMillis().getValue()) + .build(); return DistributedDataStoreFactory.createInstance("config", getConfigSchemaServiceDependency(), datastoreContext, bundleContext);