BUG-650: make ReadOnlyTrieMap concurrent 92/11192/1
authorRobert Varga <rovarga@cisco.com>
Mon, 15 Sep 2014 11:29:08 +0000 (13:29 +0200)
committerRobert Varga <rovarga@cisco.com>
Mon, 15 Sep 2014 11:32:23 +0000 (13:32 +0200)
commit5d396ccc3ebdc9bcb0494393a5df347a5bdbc25f
tree215f562824f3ee2e09779da927bb1e771bf2f6a2
parent97457a989dbefd29c7006070e669c06d87dac4c9
BUG-650: make ReadOnlyTrieMap concurrent

ReadOnlyTrieMap.delegate() guarded instantiation with a synchronized
block. This is not strictly necessary as readOnly is already volatile.
We can take snapshots concurrently and then perform a simple CAS to see
if we raced with the other thread.

Change-Id: I4e957627a6d7b10bb10fb92a8e210c1d1af22b14
Signed-off-by: Robert Varga <rovarga@cisco.com>
common/util/src/main/java/org/opendaylight/yangtools/util/ReadOnlyTrieMap.java