Added comments to the opendaylight-inventory.yang file to help describe
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / tree / DataTreeCandidate.java
index 79ce37e15621870fc4818cf6755875257dc978fa..d860dfc064cbbbb6420b39dc47840ad3f78040bf 100644 (file)
@@ -7,22 +7,29 @@
  */
 package org.opendaylight.controller.md.sal.dom.store.impl.tree;
 
-import org.opendaylight.controller.md.sal.dom.store.impl.tree.data.NodeModification;
-import org.opendaylight.controller.md.sal.dom.store.impl.tree.data.StoreMetadataNode;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
 
-public interface DataTreeCandidate extends AutoCloseable {
-       @Override
-       void close();
-
-       InstanceIdentifier getRootPath();
-
-       @Deprecated
-       NodeModification getModificationRoot();
-
-       @Deprecated
-       StoreMetadataNode getBeforeRoot();
+/**
+ * An encapsulation of a validated data tree modification. This candidate
+ * is ready for atomic commit to the datastore. It allows access to before-
+ * and after-state as it will be seen in to subsequent commit. This capture
+ * can be accessed for reference, but cannot be modified and the content
+ * is limited to nodes which were affected by the modification from which
+ * this instance originated.
+ */
+public interface DataTreeCandidate {
+    /**
+     * Get the candidate tree root node.
+     *
+     * @return Candidate tree root node
+     */
+    DataTreeCandidateNode getRootNode();
 
-       @Deprecated
-       StoreMetadataNode getAfterRoot();
+    /**
+     * Get the candidate tree root path. This is the path of the root node
+     * relative to the root of InstanceIdentifier namespace.
+     *
+     * @return Relative path of the root node
+     */
+    InstanceIdentifier getRootPath();
 }