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.yangtools.yang.data.api.schema.tree;
10 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
11 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
14 * Interface representing a data tree which can be modified in an MVCC fashion.
16 public interface DataTree extends DataTreeTip, ReadOnlyDataTree {
18 * Make the data tree use a new schema context. The context will be used
19 * only by subsequent operations.
21 * @param newSchemaContext new SchemaContext
22 * @throws IllegalArgumentException if the new context is incompatible
23 * @throws NullPointerException if newSchemaContext is null
24 * @deprecated Prefer {@link #setEffectiveModelContext(EffectiveModelContext)}.
27 void setSchemaContext(SchemaContext newSchemaContext);
30 * Make the data tree use a new schema context. The context will be used
31 * only by subsequent operations.
33 * @param newModelContext new EffectiveModelContext
34 * @throws IllegalArgumentException if the new context is incompatible
35 * @throws NullPointerException if newModelContext is null
37 void setEffectiveModelContext(EffectiveModelContext newModelContext);
40 * Commit a data tree candidate.
42 * @param candidate data tree candidate
44 void commit(DataTreeCandidate candidate);