/* * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.data.tree.impl.node; import static java.util.Objects.requireNonNull; import com.google.common.base.MoreObjects; import com.google.common.base.MoreObjects.ToStringHelper; import org.eclipse.jdt.annotation.NonNullByDefault; import org.opendaylight.yangtools.concepts.Identifiable; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.api.schema.tree.StoreTreeNode; /** * 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.
*/
// FIXME: BUG-2399: clarify that versioning rules are not enforced for non-presence containers, as they are not
// considered to be data nodes.
@NonNullByDefault
public abstract class TreeNode implements Identifiable