In this video we will learn about how ConcurrentHashMap internal works in java
Пікірлер: 11
@TechieMit Жыл бұрын
Nicely explained
@suntossh5 жыл бұрын
best Video of CHM on Internet
@dileepmaurya84116 жыл бұрын
segment is used in java 8 you can see comment over segment
@Azhagusuryaa26965 жыл бұрын
Is data itself partioning as segments when they are created.?? Like i have added 16 entries in the map. 1 segment. What happened when im adding the 17 th entry. My doubt is 1.how the segment is being created whether from the existing data or data entry put into the segments, 2. How segment retrieval happens for acquiring the lock.
@jayjoshi1366 Жыл бұрын
I found this explanation perfect for ConcurrentHashMap. Thanks for your efforts and sharing this with us. But a question arises --> If ConcurrentHashMap is not a better choice in case of more write operation doing Threads as it blocks and decrease the performance, then what would be another better choice ? Which data structure to use in place of ConcurrentHashMap if an app is having multiple write operations concurrently ? Please provide me an answer for this. Thanks _/\_
@ruchirpandit18855 жыл бұрын
So, concurrent hashmap is not a great choice if too many threads are writing to map as write operation creates lock on segment and if multiple threads write to same segment then it has perf impact. do you know of better choice for multiple write concurrency than concurrenthashmap ? Thanks
@gemphu12344 жыл бұрын
In the diagram , you are showing each bucket of the hash table array is locked and you are calling them segment. It is not right. segment array is different and each segment may point to some of the bucket range in the hash table array based on the number of segments or concurrency level.
@pareshbapna33865 жыл бұрын
Best efforts but language is a constraint while explanation. If Hindi is better then opt for Hindi tutorials rather than English ones.
@alavudin76954 жыл бұрын
Please correct your explanation about segment, its not correct
@zmxncbv955 жыл бұрын
Try to explain the concept ... average users will not be able to understand your explanation.