Remove returnSerialized from ForwardedReadyTransaction 00/35100/4
authorTom Pantelis <tpanteli@brocade.com>
Fri, 19 Feb 2016 13:48:00 +0000 (08:48 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 23 Feb 2016 11:09:07 +0000 (06:09 -0500)
With the removal of the pre-Lithium transaction messages, the
returnSerialized field in ForwardedReadyTransaction is no longer used
and thus was removed.

Change-Id: I4a23ed77ee1960d3bb634511a2222dfcd213062f
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/DistributedDataStoreRemotingIntegrationTest.java

index 07f9c90..18294a5 100644 (file)
@@ -112,7 +112,7 @@ public class ShardWriteTransaction extends ShardTransaction {
         LOG.debug("readyTransaction : {}", transactionID);
 
         getShardActor().forward(new ForwardedReadyTransaction(transactionID, clientTxVersion,
-                transaction, returnSerialized, doImmediateCommit), getContext());
+                transaction, doImmediateCommit), getContext());
 
         // The shard will handle the commit from here so we're no longer needed - self-destruct.
         getSelf().tell(PoisonPill.getInstance(), getSelf());
index b995192..a9dd058 100644 (file)
@@ -18,16 +18,13 @@ import org.opendaylight.controller.cluster.datastore.ReadWriteShardDataTreeTrans
 public class ForwardedReadyTransaction {
     private final String transactionID;
     private final ReadWriteShardDataTreeTransaction transaction;
-    private final boolean returnSerialized;
     private final boolean doImmediateCommit;
     private final short txnClientVersion;
 
     public ForwardedReadyTransaction(String transactionID, short txnClientVersion,
-            ReadWriteShardDataTreeTransaction transaction, boolean returnSerialized,
-            boolean doImmediateCommit) {
+            ReadWriteShardDataTreeTransaction transaction, boolean doImmediateCommit) {
         this.transactionID = Preconditions.checkNotNull(transactionID);
         this.transaction = Preconditions.checkNotNull(transaction);
-        this.returnSerialized = returnSerialized;
         this.txnClientVersion = txnClientVersion;
         this.doImmediateCommit = doImmediateCommit;
     }
@@ -40,10 +37,6 @@ public class ForwardedReadyTransaction {
         return transaction;
     }
 
-    public boolean isReturnSerialized() {
-        return returnSerialized;
-    }
-
     public short getTxnClientVersion() {
         return txnClientVersion;
     }
index 3b6625f..8f2eb89 100644 (file)
@@ -301,7 +301,7 @@ public abstract class AbstractShardTest extends AbstractActorTest{
             String transactionID, short version, boolean doCommitOnReady) {
         return new ForwardedReadyTransaction(transactionID, version,
                 new ReadWriteShardDataTreeTransaction(newShardDataTreeTransactionParent(cohort), transactionID,
-                        mock(DataTreeModification.class)), true, doCommitOnReady);
+                        mock(DataTreeModification.class)), doCommitOnReady);
     }
 
     protected Object prepareReadyTransactionMessage(boolean remoteReadWriteTransaction, Shard shard, ShardDataTreeCohort cohort,
index cab7b01..f318c68 100644 (file)
@@ -629,7 +629,7 @@ public class DistributedDataStoreRemotingIntegrationTest {
 
         ForwardedReadyTransaction forwardedReady = new ForwardedReadyTransaction("tx-1",
                 DataStoreVersions.CURRENT_VERSION, new ReadWriteShardDataTreeTransaction(
-                        Mockito.mock(ShardDataTreeTransactionParent.class), "tx-1", modification), true, true);
+                        Mockito.mock(ShardDataTreeTransactionParent.class), "tx-1", modification), true);
 
         carsFollowerShard.get().tell(forwardedReady, followerTestKit.getRef());
         Object resp = followerTestKit.expectMsgClass(Object.class);
@@ -649,7 +649,7 @@ public class DistributedDataStoreRemotingIntegrationTest {
 
         forwardedReady = new ForwardedReadyTransaction("tx-2",
                 DataStoreVersions.CURRENT_VERSION, new ReadWriteShardDataTreeTransaction(
-                        Mockito.mock(ShardDataTreeTransactionParent.class), "tx-2", modification), true, false);
+                        Mockito.mock(ShardDataTreeTransactionParent.class), "tx-2", modification), false);
 
         carsFollowerShard.get().tell(forwardedReady, followerTestKit.getRef());
         resp = followerTestKit.expectMsgClass(Object.class);