Remove remoterpc dead code.
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / tree / spi / MutableTreeNode.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.dom.store.impl.tree.spi;
9
10 import org.opendaylight.controller.md.sal.dom.store.impl.tree.StoreTreeNode;
11 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
12 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
13
14 /**
15  * A mutable tree node. This is a transient view materialized from a pre-existing
16  * node. Modifications are isolated. Once this object is {@link #seal()}-ed,
17  * any interactions with it will result in undefined behavior.
18  */
19 public interface MutableTreeNode extends StoreTreeNode<TreeNode> {
20     /**
21      * Set the data component of the node.
22      *
23      * @param data New data component, may not be null.
24      */
25     void setData(NormalizedNode<?, ?> data);
26
27     /**
28      * Set the new subtree version. This is typically invoked when the user
29      * has modified some of this node's children.
30      *
31      * @param subtreeVersion New subtree version.
32      */
33     void setSubtreeVersion(Version subtreeVersion);
34
35     /**
36      * Add a new child node. This acts as add-or-replace operation, e.g. it
37      * succeeds even if a conflicting child is already present.
38      *
39      * @param child New child node.
40      */
41     void addChild(TreeNode child);
42
43     /**
44      * Remove a child node. This acts as delete-or-nothing operation, e.g. it
45      * succeeds even if the corresponding child is not present.
46      *
47      * @param id Child identificator.
48      */
49     void removeChild(PathArgument id);
50
51     /**
52      * Finish node modification and return a read-only view of this node. After
53      * this method is invoked, any further calls to this object's method result
54      * in undefined behavior.
55      *
56      * @return Read-only view of this node.
57      */
58     TreeNode seal();
59 }