Does a ConcurrentHashMap need to be wrapped in a synchronized block?
问题 Do all non-retreival operations on a ConcurrentHashMap ( put() , remove() etc.) need to be wrapped in a synchronized(this) block? I understand that all of these operations are thread-safe, so is there any real benefit/need in doing so? The only operations used are put() and remove() . protected final Map<String, String> mapDataStore = new ConcurrentHashMap<String, String>(); public void updateDataStore(final String key, final String value) { ... synchronized (this) { mapDataStore.put(key,