BUG-8618: eliminate SimpleShardDataTreeCohort subclasses 98/59898/5
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 3 Jul 2017 17:57:38 +0000 (19:57 +0200)
committerRobert Varga <nite@hq.sk>
Fri, 14 Jul 2017 17:16:31 +0000 (17:16 +0000)
commit2783c9dffdd91dae87d3351f4ebffbd8679e3133
treee94e570828ae8372331ba7a5bdba777bd2a4ab5c
parentc525e5f25b951daa28d0cbde237ba3040b68f99f
BUG-8618: eliminate SimpleShardDataTreeCohort subclasses

Now that we handle pre-cancommit failures useing reportFailure(),
there is no need to have specialized subclasses for cohorts, as
the initial failure can cleanly be handled via nextFailure.

This also places a guard in reportFailure() so we do not override
a failure once it is set -- which should only happen in the case
of a dead-on-arrival transaction and it timing out in READY state.

Change-Id: I057c5b36006843f51d60034d30af83bac4e02cd7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java