java.lang.Object
java.lang.Enum<ModificationType>
org.opendaylight.yangtools.yang.data.tree.api.ModificationType
All Implemented Interfaces:
Serializable, Comparable<ModificationType>, Constable

public enum ModificationType extends Enum<ModificationType>
Enumeration of all possible node modification states. These are used in data tree modification context to quickly assess what sort of modification the node is undergoing.
  • Enum Constant Details

    • UNMODIFIED

      public static final ModificationType UNMODIFIED
      Node is currently unmodified.
    • SUBTREE_MODIFIED

      public static final ModificationType SUBTREE_MODIFIED
      A child node, either direct or indirect, has been modified. This means that the data representation of this node has potentially changed.
    • WRITE

      public static final ModificationType WRITE
      This node has been placed into the tree, potentially completely replacing pre-existing contents.
    • DELETE

      public static final ModificationType DELETE
      This node has been deleted along with any of its child nodes.
    • APPEARED

      public static final ModificationType APPEARED
      This node has appeared because it is implied by one of its children. This type is usually produced when a structural container is created to host some leaf entries. It does not have an associated before-image.

      Its semantics is a combination of SUBTREE_MODIFIED and WRITE, depending on which context it is being interpreted.

      Users who track the value of the node can treat it as a WRITE. Users transforming a DataTreeCandidate to operations on a DataTreeModification should interpret it as a SUBTREE_MODIFIED and examine its children. This is needed to correctly deal with concurrent operations on the nodes children, as issuing a write on the DataTreeModification could end up removing any leaves which have not been present at the DataTree which emitted this event.

    • DISAPPEARED

      public static final ModificationType DISAPPEARED
      This node has disappeared because it is no longer implied by any children. This type is usually produced when a structural container is removed because it has become empty. It does not have an associated after-image.

      Its semantics is a combination of SUBTREE_MODIFIED and DELETE, depending on which context it is being interpreted. Users who track the value of the node can treat it as a DELETE, as the container has disappeared. Users transforming a DataTreeCandidate to operations on a DataTreeModification should interpret it as a SUBTREE_MODIFIED and examine its children.

      This is needed to correctly deal with concurrent operations on the nodes children, as issuing a delete on the DataTreeModification would end up removing any leaves which have not been present at the DataTree which emitted this event.

  • Method Details

    • values

      public static ModificationType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ModificationType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null