X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2Ftree%2Fspi%2FMutableTreeNode.java;fp=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2Ftree%2Fspi%2FMutableTreeNode.java;h=087f4de666155217722bca1407eb168efa069eed;hp=7ab309607b908e84e0603840b9aa6bc31a7c61c5;hb=ce0f8ee50fbbc078c679bbf6305442e3aa2a2cfb;hpb=c78ba1f70be123609b88f43ce40f8555f1bc2ec7 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/MutableTreeNode.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/MutableTreeNode.java index 7ab309607b..087f4de666 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/MutableTreeNode.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/MutableTreeNode.java @@ -17,9 +17,43 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; * any interactions with it will result in undefined behavior. */ public interface MutableTreeNode extends StoreTreeNode { + /** + * Set the data component of the node. + * + * @param data New data component, may not be null. + */ void setData(NormalizedNode data); + + /** + * Set the new subtree version. This is typically invoked when the user + * has modified some of this node's children. + * + * @param subtreeVersion New subtree version. + */ void setSubtreeVersion(Version subtreeVersion); + + /** + * Add a new child node. This acts as add-or-replace operation, e.g. it + * succeeds even if a conflicting child is already present. + * + * @param child New child node. + */ void addChild(TreeNode child); + + /** + * Remove a child node. This acts as delete-or-nothing operation, e.g. it + * succeeds even if the corresponding child is not present. + * + * @param id Child identificator. + */ void removeChild(PathArgument id); + + /** + * Finish node modification and return a read-only view of this node. After + * this method is invoked, any further calls to this object's method result + * in undefined behavior. + * + * @return Read-only view of this node. + */ TreeNode seal(); }