Use java.lang.ref.Cleaner for ClientBackedTransaction 87/93287/7
authortadei.bilan <tadei.bilan@pantheon.tech>
Fri, 23 Oct 2020 11:29:50 +0000 (14:29 +0300)
committerRobert Varga <nite@hq.sk>
Tue, 17 Nov 2020 15:48:14 +0000 (15:48 +0000)
commitb0ea37067f7ac8d03cb785ce70616fa16a5ba5a4
tree9318828edf8716aa26c4b1b2218bb2b68ff95573
parent5d761355a11fc761e8faccb36b05453013f1e4d1
Use java.lang.ref.Cleaner for ClientBackedTransaction

Improve temporary file clean up by using a Cleaner to dispatch
cleaning tasks. Since it gives us a Cleanable, we can dispense with
a tracking map and removal from it -- Cleanable makes sure it is
called exactly once.

JIRA: CONTROLLER-1911
Change-Id: I02d2ee57a9fada2c54ba06008b6c28681a709748
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/ClientBackedTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractClientHandle.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedTransactionTest.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.