Populate data/ hierarchy
[yangtools.git] / data / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / tree / DataTree.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.yangtools.yang.data.api.schema.tree;
9
10 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
11
12 /**
13  * Interface representing a data tree which can be modified in an MVCC fashion.
14  */
15 public interface DataTree extends DataTreeTip, ReadOnlyDataTree {
16     /**
17      * Make the data tree use a new schema context. The context will be used
18      * only by subsequent operations.
19      *
20      * @param newModelContext new EffectiveModelContext
21      * @throws IllegalArgumentException if the new context is incompatible
22      * @throws NullPointerException if newModelContext is null
23      */
24     void setEffectiveModelContext(EffectiveModelContext newModelContext);
25
26     /**
27      * Commit a data tree candidate.
28      *
29      * @param candidate data tree candidate
30      */
31     void commit(DataTreeCandidate candidate);
32 }