Interface TreeNode
-
- All Superinterfaces:
Identifiable<YangInstanceIdentifier.PathArgument>
,StoreTreeNode<TreeNode>
@NonNullByDefault public interface TreeNode extends Identifiable<YangInstanceIdentifier.PathArgument>, StoreTreeNode<TreeNode>
A very basic data tree node. It has a version (when it was last modified), a subtree version (when any of its children were modified) and some read-only data.Semantic difference between these two is important when dealing with modifications involving parent/child relationships and what operations can be execute concurrently without creating a data dependency conflict.
A replace/delete operation cannot be applied to this node if the subtree version does not match. This mismatch still allows modifications to its descendants.
A mismatch in node version indicates a replacement, preventing a modification of descendants or itself.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NormalizedNode
getData()
Get a read-only view of the underlying data.Version
getSubtreeVersion()
Get the subtree version.Version
getVersion()
Get the data node version.MutableTreeNode
mutable()
Get a mutable, isolated copy of the node.-
Methods inherited from interface org.opendaylight.yangtools.concepts.Identifiable
getIdentifier
-
Methods inherited from interface org.opendaylight.yangtools.yang.data.api.schema.tree.StoreTreeNode
childByArg, findChildByArg, getChildByArg
-
-
-
-
Method Detail
-
getVersion
Version getVersion()
Get the data node version. This version is updated whenever the data representation of this particular node changes as a result of a direct write to this node or to its parent nodes -- thus indicating that this node was logically replaced.- Returns:
- Current data node version.
-
getSubtreeVersion
Version getSubtreeVersion()
Get the subtree version. This version is updated whenever the data representation of this particular node changes as the result of a direct or indirect child node being created, replaced or removed.- Returns:
- Current subtree version.
-
getData
NormalizedNode getData()
Get a read-only view of the underlying data.- Returns:
- Unmodifiable view of the underlying data.
-
mutable
MutableTreeNode mutable()
Get a mutable, isolated copy of the node.- Returns:
- Mutable copy
-
-