2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.config.yang.inmemory_datastore_provider;
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;
18 * The in-memory data store isn't used anymore. Deprecation notice in Carbon. Removal plan in Nitrogen.
21 public class InMemoryConfigDataStoreProviderModule extends org.opendaylight.controller.config.yang.inmemory_datastore_provider.AbstractInMemoryConfigDataStoreProviderModule {
23 public InMemoryConfigDataStoreProviderModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
24 super(identifier, dependencyResolver);
27 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) {
28 super(identifier, dependencyResolver, oldModule, oldInstance);
32 public void customValidation() {
33 // add custom validation form module attributes here.
37 public java.lang.AutoCloseable createInstance() {
38 InMemoryDOMDataStore dataStore = InMemoryDOMDataStoreFactory.create("DOM-CFG",
39 LogicalDatastoreType.CONFIGURATION, getSchemaServiceDependency(), getDebugTransactions(),
40 InMemoryDOMDataStoreConfigProperties.create(getMaxDataChangeExecutorPoolSize(),
41 getMaxDataChangeExecutorQueueSize(), getMaxDataChangeListenerQueueSize(),
42 getMaxDataStoreExecutorQueueSize()));
44 InMemoryDataStoreStats statsBean = new InMemoryDataStoreStats("InMemoryConfigDataStore", dataStore);
45 dataStore.setCloseable(statsBean);