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());
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;
}
return transaction;
}
- public boolean isReturnSerialized() {
- return returnSerialized;
- }
-
public short getTxnClientVersion() {
return txnClientVersion;
}
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,
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);
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);