use of org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore in project controller by opendaylight.
the class DOMTransactionChainTest method setupStore.
@Before
public void setupStore() {
InMemoryDOMDataStore operStore = new InMemoryDOMDataStore("OPER", MoreExecutors.newDirectExecutorService());
InMemoryDOMDataStore configStore = new InMemoryDOMDataStore("CFG", MoreExecutors.newDirectExecutorService());
schemaContext = TestModel.createTestContext();
operStore.onGlobalContextUpdated(schemaContext);
configStore.onGlobalContextUpdated(schemaContext);
ImmutableMap<LogicalDatastoreType, DOMStore> stores = //
ImmutableMap.<LogicalDatastoreType, DOMStore>builder().put(CONFIGURATION, //
configStore).put(OPERATIONAL, //
operStore).build();
ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newSingleThreadExecutor());
domBroker = new SerializedDOMDataBroker(stores, executor);
}
use of org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore in project controller by opendaylight.
the class DOMBrokerPerformanceTest method setupStore.
@Before
public void setupStore() {
InMemoryDOMDataStore operStore = new InMemoryDOMDataStore("OPER", MoreExecutors.newDirectExecutorService());
InMemoryDOMDataStore configStore = new InMemoryDOMDataStore("CFG", MoreExecutors.newDirectExecutorService());
schemaContext = TestModel.createTestContext();
operStore.onGlobalContextUpdated(schemaContext);
configStore.onGlobalContextUpdated(schemaContext);
ImmutableMap<LogicalDatastoreType, DOMStore> stores = //
ImmutableMap.<LogicalDatastoreType, DOMStore>builder().put(CONFIGURATION, //
configStore).put(OPERATIONAL, //
operStore).build();
ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newSingleThreadExecutor());
domBroker = new SerializedDOMDataBroker(stores, executor);
}
use of org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore in project controller by opendaylight.
the class InMemoryConfigDataStoreProviderModule method createInstance.
@Override
public java.lang.AutoCloseable createInstance() {
InMemoryDOMDataStore dataStore = InMemoryDOMDataStoreFactory.create("DOM-CFG", LogicalDatastoreType.CONFIGURATION, getSchemaServiceDependency(), getDebugTransactions(), InMemoryDOMDataStoreConfigProperties.create(getMaxDataChangeExecutorPoolSize(), getMaxDataChangeExecutorQueueSize(), getMaxDataChangeListenerQueueSize(), getMaxDataStoreExecutorQueueSize()));
InMemoryDataStoreStats statsBean = new InMemoryDataStoreStats("InMemoryConfigDataStore", dataStore);
dataStore.setCloseable(statsBean);
return dataStore;
}
Aggregations