*/
package org.opendaylight.yangtools.yang.data.api.schema.tree;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
/**
* Interface representing a data tree which can be modified in an MVCC fashion.
*/
-public interface DataTree {
- /**
- * Take a read-only point-in-time snapshot of the tree.
- *
- * @return Data tree snapshot.
- */
- DataTreeSnapshot takeSnapshot();
-
+public interface DataTree extends DataTreeTip, ReadOnlyDataTree {
/**
* Make the data tree use a new schema context. The context will be used
* only by subsequent operations.
*
* @param newSchemaContext new SchemaContext
* @throws IllegalArgumentException if the new context is incompatible
+ * @throws NullPointerException if newSchemaContext is null
+ * @deprecated Prefer {@link #setEffectiveModelContext(EffectiveModelContext)}.
*/
+ @Deprecated
void setSchemaContext(SchemaContext newSchemaContext);
/**
- * Validate whether a particular modification can be applied to the data tree.
- */
- void validate(DataTreeModification modification) throws DataValidationFailedException;
-
- /**
- * Prepare a modification for commit.
+ * Make the data tree use a new schema context. The context will be used
+ * only by subsequent operations.
*
- * @param modification
- * @return candidate data tree
+ * @param newModelContext new EffectiveModelContext
+ * @throws IllegalArgumentException if the new context is incompatible
+ * @throws NullPointerException if newModelContext is null
*/
- DataTreeCandidate prepare(DataTreeModification modification);
+ void setEffectiveModelContext(EffectiveModelContext newModelContext);
/**
* Commit a data tree candidate.