use of org.opendaylight.controller.sal.core.spi.data.DOMStore in project controller by opendaylight.
the class DOMDataTreeListenerTest 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", DOMDataTreeListenerTest.class);
executor = new DeadlockDetectingListeningExecutorService(commitExecutor, TransactionCommitDeadlockException.DEADLOCK_EXCEPTION_SUPPLIER, futureExecutor);
domBroker = new SerializedDOMDataBroker(stores, executor);
}
use of org.opendaylight.controller.sal.core.spi.data.DOMStore 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.sal.core.spi.data.DOMStore 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);
}
Aggregations