I have read somewhere that in ConcurrentHashMap
, the whole map object is not locked and instead a lock is made on a portion of the Map.
Can somebody elaborate when does locking come into the picture?
Is it right that while reading the Map there is no locking involved in it but while updating it only locking is used?