d860dfc064cbbbb6420b39dc47840ad3f78040bf
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / tree / DataTreeCandidate.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;
9
10 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
11
12 /**
13  * An encapsulation of a validated data tree modification. This candidate
14  * is ready for atomic commit to the datastore. It allows access to before-
15  * and after-state as it will be seen in to subsequent commit. This capture
16  * can be accessed for reference, but cannot be modified and the content
17  * is limited to nodes which were affected by the modification from which
18  * this instance originated.
19  */
20 public interface DataTreeCandidate {
21     /**
22      * Get the candidate tree root node.
23      *
24      * @return Candidate tree root node
25      */
26     DataTreeCandidateNode getRootNode();
27
28     /**
29      * Get the candidate tree root path. This is the path of the root node
30      * relative to the root of InstanceIdentifier namespace.
31      *
32      * @return Relative path of the root node
33      */
34     InstanceIdentifier getRootPath();
35 }