Add missing license headers
[controller.git] / opendaylight / md-sal / sal-inmemory-datastore / src / main / java / org / opendaylight / controller / config / yang / inmemory_datastore_provider / InMemoryConfigDataStoreProviderModule.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.config.yang.inmemory_datastore_provider;
10
11 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
12 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
13 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties;
14 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory;
15 import org.opendaylight.controller.md.sal.dom.store.impl.jmx.InMemoryDataStoreStats;
16
17 public class InMemoryConfigDataStoreProviderModule extends org.opendaylight.controller.config.yang.inmemory_datastore_provider.AbstractInMemoryConfigDataStoreProviderModule {
18
19     public InMemoryConfigDataStoreProviderModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
20         super(identifier, dependencyResolver);
21     }
22
23     public InMemoryConfigDataStoreProviderModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, final org.opendaylight.controller.config.yang.inmemory_datastore_provider.InMemoryConfigDataStoreProviderModule oldModule, final java.lang.AutoCloseable oldInstance) {
24         super(identifier, dependencyResolver, oldModule, oldInstance);
25     }
26
27     @Override
28     public void customValidation() {
29         // add custom validation form module attributes here.
30     }
31
32     @Override
33     public java.lang.AutoCloseable createInstance() {
34         InMemoryDOMDataStore dataStore = InMemoryDOMDataStoreFactory.create("DOM-CFG",
35             LogicalDatastoreType.CONFIGURATION, getSchemaServiceDependency(), getDebugTransactions(),
36             InMemoryDOMDataStoreConfigProperties.create(getMaxDataChangeExecutorPoolSize(),
37                 getMaxDataChangeExecutorQueueSize(), getMaxDataChangeListenerQueueSize(),
38                 getMaxDataStoreExecutorQueueSize()));
39
40         InMemoryDataStoreStats statsBean = new InMemoryDataStoreStats("InMemoryConfigDataStore", dataStore);
41         dataStore.setCloseable(statsBean);
42
43         return dataStore;
44     }
45
46 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.