• Post Reply Bookmark Topic Watch Topic
  • New Topic

ConcurrentHashMap - segmentation ?  RSS feed

 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ConcurrentHashMap supports segmentation , how large it becomes only certain part of it get locked to provide thread safety so other threads can still access map without waiting for iteration to complete.(ConcurrentHashMap only locked certain portion of Map)


How ConcurrentHashMap only locked certain portion of Map ?
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can check the source code by unpacking the src.zip file located in your JDK folder, then opening file java\util\concurrent\ConcurrentHashMap.java.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!