Bug 509: Added support for merge operation to InMemoryData Store
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / sal / core / spi / data / DOMStoreWriteTransaction.java
index 6761bc1968778a8894c1a475176b66c054ce92ed..ddabbc6c030f3f8ef098d207b2b250f737288ddc 100644 (file)
@@ -33,6 +33,25 @@ public interface DOMStoreWriteTransaction extends DOMStoreTransaction {
      */
     void write(InstanceIdentifier path, NormalizedNode<?, ?> data);
 
+    /**
+     * Store a provided data at specified path. This acts as a add / replace
+     * operation, which is to say that whole subtree will be replaced by
+     * specified path.
+     *
+     * If you need add or merge of current object with specified use
+     * {@link #merge(LogicalDatastoreType, Path, Object)}
+     *
+     *
+     * @param path
+     * @param data
+     *            Data object to be written
+     *
+     * @throws IllegalStateException
+     *             if the client code already sealed transaction and invoked
+     *             {@link #ready()}
+     */
+    void merge(InstanceIdentifier path, NormalizedNode<?, ?> data);
+
     /**
      *
      * Deletes data and whole subtree located at provided path.