X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2Ftree%2Fspi%2FTreeNode.java;fp=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2Ftree%2Fspi%2FTreeNode.java;h=e3c35917e226f4c7505bcbb3e3ce13dcac6c407b;hb=581592c46b0afa911f738b32b5ca33148c1e77bd;hp=0000000000000000000000000000000000000000;hpb=617941ac35b64881556f7311a8a296f4b60b2935;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/TreeNode.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/TreeNode.java new file mode 100644 index 0000000000..e3c35917e2 --- /dev/null +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/TreeNode.java @@ -0,0 +1,50 @@ +/* + * 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.controller.md.sal.dom.store.impl.tree.spi; + +import org.opendaylight.controller.md.sal.dom.store.impl.tree.StoreTreeNode; +import org.opendaylight.yangtools.concepts.Identifiable; +import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument; +import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; + +import com.google.common.primitives.UnsignedLong; + +/* + * 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. + */ +public interface TreeNode extends Identifiable, StoreTreeNode { + /** + * Get the data node version. + * + * @return Current data node version. + */ + UnsignedLong getVersion(); + + /** + * Get the subtree version. + * + * @return Current subtree version. + */ + UnsignedLong getSubtreeVersion(); + + /** + * Get a read-only view of the underlying data. + * + * @return Unmodifiable view of the underlying data. + */ + NormalizedNode getData(); + + /** + * Get a mutable, isolated copy of the node. + * + * @return Mutable copy + */ + MutableTreeNode mutable(); +}