Switch CompositeModification to bypass thread-local streams
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / modification / Modification.java
index 97b5e745df25840a3e47adb1aefbc4baf3c3c4ff..eddfba2ce1ac4d173eb5fa4a8af4f9dc4f432e4e 100644 (file)
@@ -9,23 +9,28 @@
 package org.opendaylight.controller.cluster.datastore.modification;
 
 import java.io.Externalizable;
-import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeDataOutput;
+import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
 
 /**
  * Represents a modification to the data store.
+ *
  * <p>
  * Simple modifications can be of type,
+ * <ul>
  * <li> {@link org.opendaylight.controller.cluster.datastore.modification.WriteModification}
  * <li> {@link org.opendaylight.controller.cluster.datastore.modification.MergeModification}
  * <li> {@link org.opendaylight.controller.cluster.datastore.modification.DeleteModification}
- * </p>
+ * </ul>
  *
  * <p>
  * Modifications can in turn be lumped into a single
  * {@link org.opendaylight.controller.cluster.datastore.modification.CompositeModification}
  * which can then be applied to a write transaction.
- * </p>
  */
 public interface Modification extends Externalizable {
 
@@ -49,4 +54,12 @@ public interface Modification extends Externalizable {
     void apply(DataTreeModification transaction);
 
     byte getType();
+
+    @Override
+    void writeExternal(ObjectOutput out) throws IOException;
+
+    @Override
+    void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
+
+    void writeTo(NormalizedNodeDataOutput out) throws IOException;
 }