Modify ChainedTransactionProxy to override sending of FindPrimaryShard 59/16159/3
authorTom Pantelis <tpanteli@brocade.com>
Sun, 8 Mar 2015 02:16:37 +0000 (21:16 -0500)
committerMoiz Raja <moraja@cisco.com>
Tue, 10 Mar 2015 18:55:17 +0000 (18:55 +0000)
commit691c47ae72532db04f9b2c33cb8a0cef642e5a17
tree80079fd464202f416417de4074a5fb71d3b8dc2b
parent95589305be51630beab2f6b80c098ebf72bca4b9
Modify ChainedTransactionProxy to override sending of FindPrimaryShard

Previously, ChainedTransactionProxy overrode the sendCreateTransaction
method from TransactionProxy to intercept the sending of the
CreateTransaction message in order to asynchronously wait for the
previous
transaction's ready Futures to complete before sending the message.

To facilitate write-only transaction optimizations which will not create
a separate transaction actor, we need to intercept the FindPrimaryShard
message instead. Thus a new overridden method,
sendFindPrimaryShardAsync, was added the same as sendCreateTransaction
except it sends the FindPrimaryShard message..

Change-Id: I5d0a3de0b9530a538e2425147fad8ace823763f3
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionContextImpl.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionProxyTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxyTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.