X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-common-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fcommon%2Fapi%2Fdata%2FDataModification.java;h=630078dcedea1da1a45a279d3f2ed3e313858a69;hp=d059766dea71bee37fb8fa26a051c52b2e044cfa;hb=d04e0863b86415749a8437241c57df0d32a3b133;hpb=17c23f3c4f9726f268b481398ee0ca1df499b324 diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModification.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModification.java index d059766dea..630078dced 100644 --- a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModification.java +++ b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModification.java @@ -7,20 +7,20 @@ */ package org.opendaylight.controller.md.sal.common.api.data; -import java.util.Map; -import java.util.Set; import java.util.concurrent.Future; import org.opendaylight.controller.md.sal.common.api.TransactionStatus; -// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments. -// import org.opendaylight.yangtools.concepts.Path; +import org.opendaylight.yangtools.concepts.Path; import org.opendaylight.yangtools.yang.common.RpcResult; - -public interface DataModification

*/, D> extends DataChange, DataReader { - +/** + * + * @deprecated Replaced by {@link AsyncWriteTransaction} + */ +@Deprecated +public interface DataModification

, D> extends DataChange, DataReader { /** * Returns transaction identifier - * + * * @return Transaction identifier */ Object getIdentifier(); @@ -28,24 +28,46 @@ public interface DataModification

*/, D> extends DataChange< TransactionStatus getStatus(); /** - * - * Use {@link #putOperationalData(Object, Object)} instead. - * - * @param path - * @param data + * Store a piece of data at specified path. This acts as a merge operation, + * which is to say that any pre-existing data which is not explicitly + * overwritten will be preserved. This means that if you store a container, + * its child lists will be merged. Performing the following put operations: + * + * 1) container { list [ a ] } + * 2) container { list [ b ] } + * + * will result in the following data being present: + * + * container { list [ a, b ] } + * + * This also means that storing the container will preserve any augmentations + * which have been attached to it. + * + * If you require an explicit replace operation, perform + * {@link removeOperationalData} first. */ - void putRuntimeData(P path, D data); - void putOperationalData(P path, D data); - void putConfigurationData(P path, D data); - /** - * Use {@link #removeOperationalData(Object)} - * - * @param path + * Store a piece of data at specified path. This acts as a merge operation, + * which is to say that any pre-existing data which is not explicitly + * overwritten will be preserved. This means that if you store a container, + * its child lists will be merged. Performing the following put operations: + * + * 1) container { list [ a ] } + * 2) container { list [ b ] } + * + * will result in the following data being present: + * + * container { list [ a, b ] } + * + * This also means that storing the container will preserve any augmentations + * which have been attached to it. + * + * If you require an explicit replace operation, perform + * {@link removeConfigurationData} first. */ - void removeRuntimeData(P path); + void putConfigurationData(P path, D data); void removeOperationalData(P path); @@ -53,18 +75,18 @@ public interface DataModification

*/, D> extends DataChange< /** * Initiates a two-phase commit of modification. - * + * *

* The successful commit changes the state of the system and may affect * several components. - * + * *

* The effects of successful commit of data are described in the * specifications and YANG models describing the Provider components of * controller. It is assumed that Consumer has an understanding of this * changes. - * - * + * + * * @see DataCommitHandler for further information how two-phase commit is * processed. * @param store @@ -75,5 +97,4 @@ public interface DataModification

*/, D> extends DataChange< * {@link TransactionStatus#FAILED} is reached. */ Future> commit(); - }