1 package org.opendaylight.controller.config.yang.config.distributed_datastore_provider;
3 import org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory;
4 import org.opendaylight.controller.cluster.datastore.DistributedDataStoreProperties;
5 import org.osgi.framework.BundleContext;
7 public class DistributedOperationalDataStoreProviderModule extends
8 org.opendaylight.controller.config.yang.config.distributed_datastore_provider.AbstractDistributedOperationalDataStoreProviderModule {
9 private BundleContext bundleContext;
11 public DistributedOperationalDataStoreProviderModule(
12 org.opendaylight.controller.config.api.ModuleIdentifier identifier,
13 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
14 super(identifier, dependencyResolver);
17 public DistributedOperationalDataStoreProviderModule(
18 org.opendaylight.controller.config.api.ModuleIdentifier identifier,
19 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
20 org.opendaylight.controller.config.yang.config.distributed_datastore_provider.DistributedOperationalDataStoreProviderModule oldModule,
21 java.lang.AutoCloseable oldInstance) {
22 super(identifier, dependencyResolver, oldModule, oldInstance);
26 public void customValidation() {
27 // add custom validation form module attributes here.
31 public java.lang.AutoCloseable createInstance() {
33 OperationalProperties props = getOperationalProperties();
35 props = new OperationalProperties();
38 return DistributedDataStoreFactory.createInstance("operational",
39 getOperationalSchemaServiceDependency(),
40 new DistributedDataStoreProperties(
41 props.getMaxShardDataChangeExecutorPoolSize().getValue(),
42 props.getMaxShardDataChangeExecutorQueueSize().getValue(),
43 props.getMaxShardDataChangeListenerQueueSize().getValue(),
44 props.getShardTransactionIdleTimeoutInMinutes().getValue(),
45 props.getOperationTimeoutInSeconds().getValue()), bundleContext);
48 public void setBundleContext(BundleContext bundleContext) {
49 this.bundleContext = bundleContext;