X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FShardWriteTransaction.java;h=b3f4b0b0d6d1f28f669b3fb48cfb02002447b1d7;hb=178ebab612c3ddd338e759ca7e929c25c623b0b3;hp=ee61090eeabf433218a2726fdeb6bf7557fce430;hpb=925cb4a228d0fda99c7bfeb432eb25285a223887;p=controller.git 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 ee61090eea..b3f4b0b0d6 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 @@ -23,7 +23,7 @@ import org.opendaylight.controller.cluster.datastore.modification.Modification; /** * Actor for a shard write-only transaction. * - * @author: syedbahm + * @author syedbahm */ public class ShardWriteTransaction extends ShardTransaction { @@ -33,7 +33,7 @@ public class ShardWriteTransaction extends ShardTransaction { public ShardWriteTransaction(ReadWriteShardDataTreeTransaction transaction, ActorRef shardActor, ShardStats shardStats) { - super(shardActor, shardStats, transaction.getId()); + super(shardActor, shardStats, transaction.getIdentifier()); this.transaction = transaction; } @@ -77,7 +77,7 @@ public class ShardWriteTransaction extends ShardTransaction { totalBatchedModificationsReceived, batched.getTotalMessagesSent())); } - readyTransaction(false, batched.isDoCommitOnReady(), batched.getVersion()); + readyTransaction(batched); } else { getSender().tell(new BatchedModificationsReply(batched.getModifications().size()), getSelf()); } @@ -109,13 +109,13 @@ public class ShardWriteTransaction extends ShardTransaction { } } - private void readyTransaction(boolean returnSerialized, boolean doImmediateCommit, short clientTxVersion) { - TransactionIdentifier transactionID = getTransactionID(); + private void readyTransaction(BatchedModifications batched) { + TransactionIdentifier transactionID = getTransactionId(); LOG.debug("readyTransaction : {}", transactionID); - getShardActor().forward(new ForwardedReadyTransaction(transactionID, clientTxVersion, - transaction, doImmediateCommit), getContext()); + getShardActor().forward(new ForwardedReadyTransaction(transactionID, batched.getVersion(), + transaction, batched.isDoCommitOnReady(), batched.getParticipatingShardNames()), getContext()); // The shard will handle the commit from here so we're no longer needed - self-destruct. getSelf().tell(PoisonPill.getInstance(), getSelf());