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.config.api.DependencyResolver;
12 import org.opendaylight.controller.config.api.ModuleIdentifier;
13 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
14 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
15 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties;
16 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory;
17 import org.opendaylight.controller.md.sal.dom.store.impl.jmx.InMemoryDataStoreStats;
20 * The in-memory data store isn't used anymore. Deprecation notice in Carbon. Removal plan in Nitrogen.
23 public class InMemoryOperationalDataStoreProviderModule extends AbstractInMemoryOperationalDataStoreProviderModule {
25 public InMemoryOperationalDataStoreProviderModule(final ModuleIdentifier identifier,
26 final DependencyResolver dependencyResolver) {
27 super(identifier, dependencyResolver);
30 public InMemoryOperationalDataStoreProviderModule(final ModuleIdentifier identifier,
31 final DependencyResolver dependencyResolver, final InMemoryOperationalDataStoreProviderModule oldModule,
32 final AutoCloseable oldInstance) {
33 super(identifier, dependencyResolver, oldModule, oldInstance);
37 public void customValidation() {
38 // add custom validation form module attributes here.
42 public java.lang.AutoCloseable createInstance() {
43 InMemoryDOMDataStore dataStore = InMemoryDOMDataStoreFactory.create("DOM-OPER",
44 LogicalDatastoreType.OPERATIONAL, getSchemaServiceDependency(), getDebugTransactions(),
45 InMemoryDOMDataStoreConfigProperties.create(getMaxDataChangeExecutorPoolSize(),
46 getMaxDataChangeExecutorQueueSize(), getMaxDataChangeListenerQueueSize(),
47 getMaxDataStoreExecutorQueueSize()));
49 InMemoryDataStoreStats statsBean = new InMemoryDataStoreStats("InMemoryOperationalDataStore", dataStore);
51 dataStore.setCloseable(statsBean);