2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.md.sal.dom.store.impl.tree.spi;
10 import org.opendaylight.controller.md.sal.dom.store.impl.tree.StoreTreeNode;
11 import org.opendaylight.yangtools.concepts.Identifiable;
12 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
15 import com.google.common.primitives.UnsignedLong;
18 * A very basic data tree node. It has a version (when it was last modified),
19 * a subtree version (when any of its children were modified) and some read-only
22 public interface TreeNode extends Identifiable<PathArgument>, StoreTreeNode<TreeNode> {
24 * Get the data node version.
26 * @return Current data node version.
28 UnsignedLong getVersion();
31 * Get the subtree version.
33 * @return Current subtree version.
35 UnsignedLong getSubtreeVersion();
38 * Get a read-only view of the underlying data.
40 * @return Unmodifiable view of the underlying data.
42 NormalizedNode<?, ?> getData();
45 * Get a mutable, isolated copy of the node.
47 * @return Mutable copy
49 MutableTreeNode mutable();