Is the following code set up to correctly synchronize the calls on synchronizedMap?
synchronizedMap
public class MyClass { private static Map
Collections.synchronizedMap() guarantees that each atomic operation you want to run on the map will be synchronized.
Collections.synchronizedMap()
Running two (or more) operations on the map however, must be synchronized in a block. So yes - you are synchronizing correctly.