Exclusively Locking ConcurrentHashMap
问题 I know that it is not possible to lock a ConcurrentHashMap for exclusive access. However, I cannot find why. Is it because the "Segments" which constitue CHM aren't exposed by the api? Presumably if they were, the client code could perform a "hand-over-hand" locking? Cheers 回答1: I know that it is not possible to lock a ConcurrentHashMap for exclusive access. However, I cannot find why. Simple - because it is not true. How about single instance per thread? How about synchronized methods or