+ public Optional<NormalizedNode<?, ?>> readNode(YangInstanceIdentifier path) {
+ return dataTree.takeSnapshot().readNode(path);
+ }
+
+ public DataTreeSnapshot takeSnapshot() {
+ return dataTree.takeSnapshot();
+ }
+
+ public DataTreeModification newModification() {
+ return dataTree.takeSnapshot().newModification();
+ }
+
+ // FIXME: This should be removed, it violates encapsulation
+ public DataTreeCandidate commit(DataTreeModification modification) throws DataValidationFailedException {
+ modification.ready();
+ dataTree.validate(modification);
+ DataTreeCandidateTip candidate = dataTree.prepare(modification);
+ dataTree.commit(candidate);
+ return candidate;
+ }