Merge "Clarify the semantics of put{Configuration,Operational}Data()"
authorEd Warnicke <eaw@cisco.com>
Mon, 3 Feb 2014 22:42:40 +0000 (22:42 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 3 Feb 2014 22:42:40 +0000 (22:42 +0000)
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModification.java

index d74b26dae24ae374aa5b03f987eea27c12fe7113..29ba192ba821294ceff36aa8de3b83a445edce16 100644 (file)
@@ -37,8 +37,46 @@ public interface DataModification<P/* extends Path<P> */, D> extends DataChange<
     @Deprecated
     void putRuntimeData(P path, D 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 putOperationalData(P path, D 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 removeConfigurationData} first.
+     */
     void putConfigurationData(P path, D data);
 
     /**