connect
connect copied to clipboard
Fully implement java.util.concurrent.ConcurrentMap for global maps
GlobalVariableStore and GlobalChannelVariableStore are both backed by ConcurrentHashMaps, but don't support any of the atomic methods from the ConcurrentMap interface for thread-safe operations.
Imported Issue. Original Details: Jira Issue Key: MIRTH-4468 Reporter: agermano Created: 2019-10-09T22:24:55.000-0700
Those "sync" methods were created a long time ago, probably to satisfy some narrow use-case at the time. We need to overhaul those to make them easier to understand and more applicable to real use-cases around synchronization. It's probably fine to just rip out the old stuff without deprecating anything, since I doubt anyone uses them.
Imported Comment. Original Details: Author: narupley Created: 2019-10-29T12:40:10.000-0700
Original issue for the sync methods: https://github.com/nextgenhealthcare/connect/issues/1277
I think it's very unlikely that they are being used, too. I would like to have access to the putIfAbsent()
and computeIfAbsent()
methods more than anything. If the maps themselves were ConcurrentHashMaps, all of the methods added in java 8 to support functional interfaces would be more useful and less surprising than these undocumented sync methods which appear to have been added for mirth 2.0.