X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-data-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fapi%2Fschema%2Ftree%2FDataTreeSnapshot.java;h=3197e9814ba42582f06d91735618ed5611284886;hb=11f324d00534f75932df67ba737efe261271cb47;hp=4eb268a188c2ac0fd770c9d989ecae7e8c999388;hpb=6c8e31286e3adaf52ed3decce3d78198ef88338a;p=yangtools.git diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeSnapshot.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeSnapshot.java index 4eb268a188..3197e9814b 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeSnapshot.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeSnapshot.java @@ -7,31 +7,30 @@ */ package org.opendaylight.yangtools.yang.data.api.schema.tree; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import java.util.Optional; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; - -import com.google.common.base.Optional; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider; /** - * Read-only snapshot of a {@link DataTree}. The snapshot is stable and isolated, - * e.g. data tree changes occurring after the snapshot has been taken are not - * visible through the snapshot. + * Read-only snapshot of a {@link DataTree}. The snapshot is stable and isolated, e.g. data tree changes occurring after + * the snapshot has been taken are not visible through the snapshot. */ -public interface DataTreeSnapshot { +public interface DataTreeSnapshot extends EffectiveModelContextProvider { /** * Read a particular node from the snapshot. * * @param path Path of the node * @return Optional result encapsulating the presence and value of the node */ - Optional> readNode(InstanceIdentifier path); + Optional> readNode(YangInstanceIdentifier path); /** * Create a new data tree modification based on this snapshot, using the * specified data application strategy. * - * @param strategy data modification strategy * @return A new data tree modification */ - DataTreeModification newModification(); + @NonNull DataTreeModification newModification(); }