Refactor DataStoreContext 36/14936/10
authorMoiz Raja <moraja@cisco.com>
Thu, 5 Feb 2015 19:58:06 +0000 (11:58 -0800)
committerMoiz Raja <moraja@cisco.com>
Wed, 11 Feb 2015 18:50:22 +0000 (10:50 -0800)
commit59a01944da911867aa5c7966345a3cab7d75c6ae
tree33b787e108c163ca0609296752eb67f8422ea117
parent2a01b2263488748bd07d224a01b23f5550274447
Refactor DataStoreContext

It was getting difficult to maintain because we had the same field defined
in the Builder and the DatastoreContext and we were passing the fields along
using the DatastoreContext constructor. This meant that every new setting that
we added required multiple changes to be made to DatastoreContext.

Refactored for the Builder to create the DatastoreContext upfront and directly set
it's fields.

Change-Id: I8060c4ea3dfd02a5cac20e28fb5be2f26b1e1dbd
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContext.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextTest.java [new file with mode: 0644]