use of org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore in project controller by opendaylight.
the class InMemoryDataStoreWithSameThreadedExecutorBenchmark method setUp.
@Override
@Setup(Level.Trial)
public void setUp() throws Exception {
final String name = "DS_BENCHMARK";
final ExecutorService dataChangeListenerExecutor = SpecialExecutors.newBlockingBoundedFastThreadPool(MAX_DATA_CHANGE_EXECUTOR_POOL_SIZE, MAX_DATA_CHANGE_EXECUTOR_QUEUE_SIZE, name + "-DCL");
domStore = new InMemoryDOMDataStore("SINGLE_THREADED_DS_BENCHMARK", dataChangeListenerExecutor);
schemaContext = BenchmarkModel.createTestContext();
domStore.onGlobalContextUpdated(schemaContext);
initTestNode();
}
use of org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore in project controller by opendaylight.
the class DOMBrokerTest 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);
final ImmutableMap<LogicalDatastoreType, DOMStore> stores = //
ImmutableMap.<LogicalDatastoreType, DOMStore>builder().put(CONFIGURATION, //
configStore).put(OPERATIONAL, //
operStore).build();
commitExecutor = new CommitExecutorService(Executors.newSingleThreadExecutor());
futureExecutor = SpecialExecutors.newBlockingBoundedCachedThreadPool(1, 5, "FCB", DOMBrokerTest.class);
executor = new DeadlockDetectingListeningExecutorService(commitExecutor, TransactionCommitDeadlockException.DEADLOCK_EXCEPTION_SUPPLIER, futureExecutor);
domBroker = new SerializedDOMDataBroker(stores, executor);
}
use of org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore in project controller by opendaylight.
the class InMemoryOperationalDataStoreProviderModule method createInstance.
@Override
public java.lang.AutoCloseable createInstance() {
InMemoryDOMDataStore dataStore = InMemoryDOMDataStoreFactory.create("DOM-OPER", LogicalDatastoreType.OPERATIONAL, getSchemaServiceDependency(), getDebugTransactions(), InMemoryDOMDataStoreConfigProperties.create(getMaxDataChangeExecutorPoolSize(), getMaxDataChangeExecutorQueueSize(), getMaxDataChangeListenerQueueSize(), getMaxDataStoreExecutorQueueSize()));
InMemoryDataStoreStats statsBean = new InMemoryDataStoreStats("InMemoryOperationalDataStore", dataStore);
dataStore.setCloseable(statsBean);
return dataStore;
}
use of org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore in project controller by opendaylight.
the class AbstractDataBrokerTestCustomizer method createConfigurationDatastore.
public DOMStore createConfigurationDatastore() {
final InMemoryDOMDataStore store = new InMemoryDOMDataStore("CFG", getDataTreeChangeListenerExecutor());
this.schemaService.registerSchemaContextListener(store);
return store;
}
use of org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore in project controller by opendaylight.
the class AbstractDataBrokerTestCustomizer method createOperationalDatastore.
public DOMStore createOperationalDatastore() {
final InMemoryDOMDataStore store = new InMemoryDOMDataStore("OPER", getDataTreeChangeListenerExecutor());
this.schemaService.registerSchemaContextListener(store);
return store;
}
Aggregations