// Verify the data in the store
final DOMStoreReadTransaction readTx = dataStore.newReadOnlyTransaction();
// Verify the data in the store
final DOMStoreReadTransaction readTx = dataStore.newReadOnlyTransaction();
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", car, optional.get());
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", car, optional.get());
readWriteTx.write(nodePath, nodeToWrite);
// 3. Read the data from Tx
final Boolean exists = readWriteTx.exists(nodePath).get(5, TimeUnit.SECONDS);
assertEquals("exists", Boolean.TRUE, exists);
readWriteTx.write(nodePath, nodeToWrite);
// 3. Read the data from Tx
final Boolean exists = readWriteTx.exists(nodePath).get(5, TimeUnit.SECONDS);
assertEquals("exists", Boolean.TRUE, exists);
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", nodeToWrite, optional.get());
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", nodeToWrite, optional.get());
final Boolean exists = readWriteTx.exists(carPath).get(5, TimeUnit.SECONDS);
assertEquals("exists", Boolean.TRUE, exists);
final Boolean exists = readWriteTx.exists(carPath).get(5, TimeUnit.SECONDS);
assertEquals("exists", Boolean.TRUE, exists);
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", car, optional.get());
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", car, optional.get());
.read(CarsModel.CAR_LIST_PATH).get(5, TimeUnit.SECONDS);
assertTrue("isPresent", optional.isPresent());
.read(CarsModel.CAR_LIST_PATH).get(5, TimeUnit.SECONDS);
assertTrue("isPresent", optional.isPresent());
writeTx.write(TestModel.TEST_PATH, testNode);
// 3. Ready the Tx for commit
writeTx.write(TestModel.TEST_PATH, testNode);
// 3. Ready the Tx for commit
// the data from the first
// Tx is visible after being readied.
DOMStoreReadTransaction readTx = txChain.newReadOnlyTransaction();
// the data from the first
// Tx is visible after being readied.
DOMStoreReadTransaction readTx = txChain.newReadOnlyTransaction();
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", testNode, optional.get());
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", testNode, optional.get());
final YangInstanceIdentifier personPath = PeopleModel.newPersonPath("jack");
readWriteTx.merge(personPath, person);
final YangInstanceIdentifier personPath = PeopleModel.newPersonPath("jack");
readWriteTx.merge(personPath, person);
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", car, optional.get());
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", car, optional.get());
.read(LogicalDatastoreType.CONFIGURATION, CarsModel.CAR_LIST_PATH).get(5, TimeUnit.SECONDS);
assertTrue("isPresent", optional.isPresent());
.read(LogicalDatastoreType.CONFIGURATION, CarsModel.CAR_LIST_PATH).get(5, TimeUnit.SECONDS);
assertTrue("isPresent", optional.isPresent());
final DOMStoreThreePhaseCommitCohort cohort1 = writeTx.ready();
// Create read-only tx's and issue a read.
final DOMStoreThreePhaseCommitCohort cohort1 = writeTx.ready();
// Create read-only tx's and issue a read.
DataTree dataTree = new InMemoryDataTreeFactory().create(
DataTreeConfiguration.DEFAULT_OPERATIONAL, SchemaContextHelper.full());
AbstractShardTest.writeToStore(dataTree, CarsModel.BASE_PATH, carsNode);
DataTree dataTree = new InMemoryDataTreeFactory().create(
DataTreeConfiguration.DEFAULT_OPERATIONAL, SchemaContextHelper.full());
AbstractShardTest.writeToStore(dataTree, CarsModel.BASE_PATH, carsNode);
final Snapshot carsSnapshot = Snapshot.create(
new ShardSnapshotState(new MetadataShardDataTreeSnapshot(root)),
final Snapshot carsSnapshot = Snapshot.create(
new ShardSnapshotState(new MetadataShardDataTreeSnapshot(root)),
dataTree = new InMemoryDataTreeFactory().create(DataTreeConfiguration.DEFAULT_OPERATIONAL,
SchemaContextHelper.full());
dataTree = new InMemoryDataTreeFactory().create(DataTreeConfiguration.DEFAULT_OPERATIONAL,
SchemaContextHelper.full());
AbstractShardTest.writeToStore(dataTree, PeopleModel.BASE_PATH, peopleNode);
root = AbstractShardTest.readStore(dataTree, YangInstanceIdentifier.empty());
AbstractShardTest.writeToStore(dataTree, PeopleModel.BASE_PATH, peopleNode);
root = AbstractShardTest.readStore(dataTree, YangInstanceIdentifier.empty());
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", carsNode, optional.get());
assertTrue("isPresent", optional.isPresent());
assertEquals("Data node", carsNode, optional.get());
ContainerNode rootNode = ImmutableContainerNodeBuilder.create()
.withNodeIdentifier(YangInstanceIdentifier.NodeIdentifier.create(SchemaContext.NAME))
ContainerNode rootNode = ImmutableContainerNodeBuilder.create()
.withNodeIdentifier(YangInstanceIdentifier.NodeIdentifier.create(SchemaContext.NAME))