Re-create transaction chain upon failure in TopologyStatsProvider
Transaction failures can occur as a side-effect of various datastore
failure scenarios. In case of TopologyStatsProviderImpl, such a failure
requires manual intervention to restart the component (and thus
re-establish exports).
Rework transaction chain lifecycle, so that we close it down on failures
and establish a new chain when we need it for the periodic updates
and/or unbind operations.
Since we are modifying lifecycle, also make sure we work in terms of a
TimerTask with an externally-provided timer -- we really do not care how
we are scheduled.
JIRA: BGPCEP-920
Change-Id: I6f2be6a5c14ac6e191988c3b7bfd56b78b94abb6
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>