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 07f9c90fa2e42baf47677d4f33f8449377d7bf7f..18294a50fa454457aa4535444a2fd7a2eb0140da 100644 (file)
@@ -112,7 +112,7 @@ public class ShardWriteTransaction extends ShardTransaction {
         LOG.debug("readyTransaction : {}", transactionID);
 
         getShardActor().forward(new ForwardedReadyTransaction(transactionID, clientTxVersion,
         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());
 
         // The shard will handle the commit from here so we're no longer needed - self-destruct.
         getSelf().tell(PoisonPill.getInstance(), getSelf());
index b995192113e1ad088b88c0ed7b2925d58abba42e..a9dd058b005375547bf1bf834b7a5db8a98edefd 100644 (file)
@@ -18,16 +18,13 @@ import org.opendaylight.controller.cluster.datastore.ReadWriteShardDataTreeTrans
 public class ForwardedReadyTransaction {
     private final String transactionID;
     private final ReadWriteShardDataTreeTransaction transaction;
 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,
     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.transactionID = Preconditions.checkNotNull(transactionID);
         this.transaction = Preconditions.checkNotNull(transaction);
-        this.returnSerialized = returnSerialized;
         this.txnClientVersion = txnClientVersion;
         this.doImmediateCommit = doImmediateCommit;
     }
         this.txnClientVersion = txnClientVersion;
         this.doImmediateCommit = doImmediateCommit;
     }
@@ -40,10 +37,6 @@ public class ForwardedReadyTransaction {
         return transaction;
     }
 
         return transaction;
     }
 
-    public boolean isReturnSerialized() {
-        return returnSerialized;
-    }
-
     public short getTxnClientVersion() {
         return txnClientVersion;
     }
     public short getTxnClientVersion() {
         return txnClientVersion;
     }
index 3b6625f15a1f9db9d2211c871ed69874ba52c72b..8f2eb89dfcaa297284d5066001c82a32b385dccd 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,
             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,
     }
 
     protected Object prepareReadyTransactionMessage(boolean remoteReadWriteTransaction, Shard shard, ShardDataTreeCohort cohort,
index cab7b01cfdf49af15fae6eb19453d344bd79a6be..f318c68c864ccada5c62f5085dee8267e63039cd 100644 (file)
@@ -629,7 +629,7 @@ public class DistributedDataStoreRemotingIntegrationTest {
 
         ForwardedReadyTransaction forwardedReady = new ForwardedReadyTransaction("tx-1",
                 DataStoreVersions.CURRENT_VERSION, new ReadWriteShardDataTreeTransaction(
 
         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);
 
         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(
 
         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);
 
         carsFollowerShard.get().tell(forwardedReady, followerTestKit.getRef());
         resp = followerTestKit.expectMsgClass(Object.class);