Removed unused Modification field in ForwardedReadyTransaction 68/31168/1
authorTom Pantelis <tpanteli@brocade.com>
Wed, 9 Dec 2015 17:00:30 +0000 (12:00 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 10 Dec 2015 21:16:09 +0000 (16:16 -0500)
The Modification field is no longer used.

Change-Id: I1b0ace3cf7a663fa3c14da1b5785fc05b77203bc
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardWriteTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ForwardedReadyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreLithiumShardTest.java

index 90b01e5..8cce195 100644 (file)
@@ -198,7 +198,7 @@ public class ShardWriteTransaction extends ShardTransaction {
         ShardDataTreeCohort cohort =  transaction.ready();
 
         getShardActor().forward(new ForwardedReadyTransaction(transactionID, getClientTxVersion(),
-                cohort, compositeModification, returnSerialized, doImmediateCommit), getContext());
+                cohort, returnSerialized, doImmediateCommit), getContext());
 
         // The shard will handle the commit from here so we're no longer needed - self-destruct.
         getSelf().tell(PoisonPill.getInstance(), getSelf());
index 2f48ab9..719f66c 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.controller.cluster.datastore.messages;
 
 import org.opendaylight.controller.cluster.datastore.ShardDataTreeCohort;
-import org.opendaylight.controller.cluster.datastore.modification.Modification;
 
 /**
  * Transaction ReadyTransaction message that is forwarded to the local Shard from the ShardTransaction.
@@ -18,17 +17,15 @@ import org.opendaylight.controller.cluster.datastore.modification.Modification;
 public class ForwardedReadyTransaction {
     private final String transactionID;
     private final ShardDataTreeCohort cohort;
-    private final Modification modification;
     private final boolean returnSerialized;
     private final boolean doImmediateCommit;
     private final short txnClientVersion;
 
     public ForwardedReadyTransaction(String transactionID, short txnClientVersion,
-            ShardDataTreeCohort cohort, Modification modification,
-            boolean returnSerialized, boolean doImmediateCommit) {
+            ShardDataTreeCohort cohort, boolean returnSerialized,
+            boolean doImmediateCommit) {
         this.transactionID = transactionID;
         this.cohort = cohort;
-        this.modification = modification;
         this.returnSerialized = returnSerialized;
         this.txnClientVersion = txnClientVersion;
         this.doImmediateCommit = doImmediateCommit;
@@ -42,10 +39,6 @@ public class ForwardedReadyTransaction {
         return cohort;
     }
 
-    public Modification getModification() {
-        return modification;
-    }
-
     public boolean isReturnSerialized() {
         return returnSerialized;
     }
index c03615c..a196eda 100644 (file)
@@ -253,8 +253,7 @@ public abstract class AbstractShardTest extends AbstractActorTest{
                                                                   MutableCompositeModification modification,
                                                                   boolean doCommitOnReady) {
         if(remoteReadWriteTransaction){
-            return new ForwardedReadyTransaction(transactionID, CURRENT_VERSION,
-                    cohort, modification, true, doCommitOnReady);
+            return new ForwardedReadyTransaction(transactionID, CURRENT_VERSION, cohort, true, doCommitOnReady);
         } else {
             setupCohortDecorator(shard, cohort);
             return prepareBatchedModifications(transactionID, modification, doCommitOnReady);
index fc9a3a8..ad1daff 100644 (file)
@@ -251,7 +251,7 @@ public class PreLithiumShardTest extends AbstractShardTest {
             // by the ShardTransaction.
 
             shard.tell(new ForwardedReadyTransaction(transactionID1, HELIUM_2_VERSION,
-                    cohort1, modification1, true, false), getRef());
+                    cohort1, true, false), getRef());
             ReadyTransactionReply readyReply = ReadyTransactionReply.fromSerializable(
                     expectMsgClass(duration, ReadyTransactionReply.SERIALIZABLE_CLASS));
             assertEquals("Cohort path", shard.path().toString(), readyReply.getCohortPath());
@@ -266,11 +266,11 @@ public class PreLithiumShardTest extends AbstractShardTest {
             // Send the ForwardedReadyTransaction for the next 2 Tx's.
 
             shard.tell(new ForwardedReadyTransaction(transactionID2, HELIUM_2_VERSION,
-                    cohort2, modification2, true, false), getRef());
+                    cohort2, true, false), getRef());
             expectMsgClass(duration, ReadyTransactionReply.SERIALIZABLE_CLASS);
 
             shard.tell(new ForwardedReadyTransaction(transactionID3, HELIUM_2_VERSION,
-                    cohort3, modification3, true, false), getRef());
+                    cohort3, true, false), getRef());
             expectMsgClass(duration, ReadyTransactionReply.SERIALIZABLE_CLASS);
 
             // Send the CanCommitTransaction message for the next 2 Tx's. These should get queued and