From: Tom Pantelis Date: Wed, 9 Dec 2015 17:00:30 +0000 (-0500) Subject: Removed unused Modification field in ForwardedReadyTransaction X-Git-Tag: release/beryllium~95 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=f6f6dcaf827bcad41a3f9045f2dc74a36371e1b4 Removed unused Modification field in ForwardedReadyTransaction The Modification field is no longer used. Change-Id: I1b0ace3cf7a663fa3c14da1b5785fc05b77203bc Signed-off-by: Tom Pantelis --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardWriteTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardWriteTransaction.java index 90b01e5200..8cce195021 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardWriteTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardWriteTransaction.java @@ -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()); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ForwardedReadyTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ForwardedReadyTransaction.java index 2f48ab9d1b..719f66c018 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ForwardedReadyTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ForwardedReadyTransaction.java @@ -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; } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java index c03615cffd..a196eda597 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java @@ -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); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreLithiumShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreLithiumShardTest.java index fc9a3a8e5f..ad1daff1cf 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreLithiumShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreLithiumShardTest.java @@ -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