Refactor LegacyTransactionConntextImpl 32/16032/4
authorTom Pantelis <tpanteli@brocade.com>
Wed, 4 Mar 2015 07:53:09 +0000 (02:53 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Sun, 8 Mar 2015 02:03:34 +0000 (21:03 -0500)
commit12a411738c5d9030a1a196f04fdf5ec0f4c3395e
tree50abb8e6da5e118b77296f75cbf8c318be2ead22
parent5799fd0c2c4e2508ca9beb0a2af5c76d049d3155
Refactor LegacyTransactionConntextImpl

We have a compat package so the LegacyTransactionConntextImpl really
belongs there to keep it separate from the current classes. Also Legacy
really isn't a good name as it's too generic. The
LegacyTransactionConntextImpl is really specific to  pre-Lithium
compatibility so I renamed it to PreLithiumTransactionContextImpl to
make it clear.

I also refactored the helium compatibility tests in TransactionProxyTest
into a new PreLithiumTransactionProxyTest class to keep them separate.
This will make it easier to remove PreLithiumTransactionContextImpl and
its test code when it's no longer needed. Since it needs the same setup
as TransactionProxyTest and some of the utility methods, I moved all the
setup and utility methods to an AbstractTransactionProxyTest to avoid
duplication. This also makes TransactionProxyTest smaller as it now only
contains the test methods.

Change-Id: I9a81c7a1a07fac9098d497ff301c5d1909094c1b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/OperationCompleter.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/main/java/org/opendaylight/controller/cluster/datastore/compat/PreLithiumTransactionContextImpl.java [moved from opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LegacyTransactionContextImpl.java with 83% similarity]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionProxyTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreLithiumTransactionProxyTest.java [new file with mode: 0644]