Use compareAndExchange() to set closeFuture 72/109272/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 9 Dec 2023 10:51:14 +0000 (11:51 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 10 Dec 2023 10:44:02 +0000 (11:44 +0100)
commitaebfa4e09d2b35c8da3fb88d8a5883d84dab6b11
tree7a3519d770019665f35d4b51e7ceae7c8fe5b5b9
parent9e23304d266d00210f1aeec57a99a1d8694caffe
Use compareAndExchange() to set closeFuture

Java 9+ gives us a convenient way to ensure null-safety in this CAS
operation -- compareAndExchange() returns the witness value, i.e.
we get the value instead of a plain boolean false.

Change-Id: I636b0f084170d42bbd99490577917afefe5145e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b61b30a4b2be38c8629bf9c5d66d05609db3be1c)
singleton-service/mdsal-singleton-dom-impl/src/main/java/org/opendaylight/mdsal/singleton/dom/impl/ClusterSingletonServiceGroupImpl.java