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=4d20b6f4f46fc31967feeccdf28df533a2e071c6;hp=cd27d1df7944d43f6bbd8e44223513cc7f4d044f;hb=9e525899b4f66248ac4efac0a70cf0dc74305f95;hpb=233db109dea38ed45ca3c48eba04f302e38a9139;ds=sidebyside 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 cd27d1df79..4d20b6f4f4 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,7 +1,17 @@ +/* + * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; import org.opendaylight.controller.cluster.datastore.DatastoreContext; +import org.opendaylight.controller.cluster.datastore.DatastoreSnapshotRestore; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory; +import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.osgi.framework.BundleContext; public class DistributedConfigDataStoreProviderModule extends @@ -40,7 +50,7 @@ public class DistributedConfigDataStoreProviderModule extends } DatastoreContext datastoreContext = DatastoreContext.newBuilder() - .dataStoreType("config") + .logicalStoreType(LogicalDatastoreType.CONFIGURATION) .maxShardDataChangeExecutorPoolSize(props.getMaxShardDataChangeExecutorPoolSize().getValue().intValue()) .maxShardDataChangeExecutorQueueSize(props.getMaxShardDataChangeExecutorQueueSize().getValue().intValue()) .maxShardDataChangeListenerQueueSize(props.getMaxShardDataChangeListenerQueueSize().getValue().intValue()) @@ -67,10 +77,13 @@ public class DistributedConfigDataStoreProviderModule extends .shardCommitQueueExpiryTimeoutInSeconds( props.getShardCommitQueueExpiryTimeoutInSeconds().getValue().intValue()) .transactionDebugContextEnabled(props.getTransactionDebugContextEnabled()) + .customRaftPolicyImplementation(props.getCustomRaftPolicyImplementation()) + .shardSnapshotChunkSize(props.getShardSnapshotChunkSize().getValue().intValue()) .build(); return DistributedDataStoreFactory.createInstance(getConfigSchemaServiceDependency(), - datastoreContext, bundleContext); + datastoreContext, DatastoreSnapshotRestore.instance().getAndRemove(datastoreContext.getDataStoreName()), + getConfigActorSystemProviderDependency().getActorSystem(), bundleContext); } public void setBundleContext(BundleContext bundleContext) {