Merge "OVSDB L3 support: Allow for override of default gateway mac address"
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / config / yang / config / distributed_datastore_provider / DistributedConfigDataStoreProviderModule.java
1 package org.opendaylight.controller.config.yang.config.distributed_datastore_provider;
2
3 import org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory;
4 import org.opendaylight.controller.cluster.datastore.DistributedDataStoreProperties;
5
6 public class DistributedConfigDataStoreProviderModule extends
7     org.opendaylight.controller.config.yang.config.distributed_datastore_provider.AbstractDistributedConfigDataStoreProviderModule {
8     public DistributedConfigDataStoreProviderModule(
9         org.opendaylight.controller.config.api.ModuleIdentifier identifier,
10         org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
11         super(identifier, dependencyResolver);
12     }
13
14     public DistributedConfigDataStoreProviderModule(
15         org.opendaylight.controller.config.api.ModuleIdentifier identifier,
16         org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
17         org.opendaylight.controller.config.yang.config.distributed_datastore_provider.DistributedConfigDataStoreProviderModule oldModule,
18         java.lang.AutoCloseable oldInstance) {
19         super(identifier, dependencyResolver, oldModule, oldInstance);
20     }
21
22     @Override
23     public void customValidation() {
24         // add custom validation form module attributes here.
25     }
26
27     @Override
28     public java.lang.AutoCloseable createInstance() {
29
30         ConfigProperties props = getConfigProperties();
31         if(props == null) {
32             props = new ConfigProperties();
33         }
34
35         return DistributedDataStoreFactory.createInstance("config", getConfigSchemaServiceDependency(),
36                 new DistributedDataStoreProperties(
37                         props.getMaxShardDataChangeExecutorPoolSize().getValue(),
38                         props.getMaxShardDataChangeExecutorQueueSize().getValue(),
39                         props.getMaxShardDataChangeListenerQueueSize().getValue(),
40                         props.getShardTransactionIdleTimeoutInMinutes().getValue(),
41                         props.getOperationTimeoutInSeconds().getValue()));
42     }
43 }