Cache MapJoiner
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / modification / AbstractModification.java
index ffb263519a26cbceb4da2f09c3f17d66e77f7fd2..02b8047b44bfae5ca1094acc5b26ddfd07890a1b 100644 (file)
@@ -8,15 +8,34 @@
 
 package org.opendaylight.controller.cluster.datastore.modification;
 
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 
 /**
- * Base class to be used for all simple modifications that can be applied to a DOMStoreTransaction
+ * Base class to be used for all simple modifications that can be applied to a DOMStoreTransaction.
  */
 public abstract class AbstractModification implements Modification {
-  protected final InstanceIdentifier path;
 
-  protected AbstractModification(InstanceIdentifier path) {
-    this.path = path;
-  }
+    private YangInstanceIdentifier path;
+    private short version;
+
+    protected AbstractModification(short version) {
+        this.version = version;
+    }
+
+    protected AbstractModification(YangInstanceIdentifier path) {
+        this.path = path;
+    }
+
+    protected void setPath(YangInstanceIdentifier path) {
+        this.path = path;
+    }
+
+    public YangInstanceIdentifier getPath() {
+        return path;
+    }
+
+    public short getVersion() {
+        return version;
+    }
 }