Collection Basics
What is Collection
Why Collection ?
Collection API
Collection Hierarchy
List
What is List
What is ArrayList
What is LinkedList
What is Vector
method of vector class in java
What is Stack
List Advance
ArrayList user defined object
ArrayList internal implementation
LinkedList internal implementation
ArrayList VS LinkedList
ArrayList VS Vector
Set
What is HashSet
What is LinkedHashSet
What is TreeSet
Set Advance
When to Use HashSet
HashSet internal Working
When to use LinkedHashSet
TreeSet internal Working
Set add method
Iterate Collection
Iterate Collection
Advance for loop
What is Iterator
Advantage of Iterator
What is ListIterator
Iterator VS ListLterator
What is Enumeration
Enumeration VS Iterator
Map
What is HashMap
What is LinkedHashMap
What is TreeMap
What is Hashtable
What is WeakHashMap
What is IdentityHashMap
What is Properties file
Map Advance
What is Load-Factor
how to load properties file in java
how to iterate map in java
how to retrieve element of map using keySet
difference between hashmap and hashtable
Map Interview
Internal implementation of HashMap
HashMap Collision
Rehashing Process
Internal working of LinkedHashMap
Queue
What is Priority Queue
Concurrent Collections
Concurrent Collections
Concurrentmap in java
Why ConcurrentModificationException
What is ConcurrentHashMap
Internal Implementation of CHM
HashMap VS ConcurrentHashMap
What is CopyOnWriteArrayList
What is CopyOnWriteArraySet
Concurrent Map 2
Arraylist VS CopyOnWriteArrayList
put() VS putIfAbsent()
remove() method
replace() method
Collection Sorting
Comparable
Comparator
Comparable VS Comparator
Sort by multiple fields
Extra
Legacy class
Arrays class
What is Collections
Collection VS Collections
immutable object

internal implementation of concurrenthashmap in java


internal implementation of ConcurrentHashMap in java

The total ConcurrentHashMap object will be divided into multiple parts and for every part internally a Lock will be maintained.

It is based on Bucket level Locking.

ConcurrentHashMap is working on Concurrency Level.

At a time any number of threads  can  read the data of ConcurrentHashMap, But  at a time only 16 threads can  write and update data to ConcurrentHashMap object.

By default concurrency level  of ConcurrentHashMap is 16, But we can increase this concurrency level.

While iterating ConcurrentHashMap object if any thread updated some value in existing ConcurrentHashMap then it is not  predictable to Iterator will iterate that updated value.

What is concurrency level

Object of ConcurrentHashMap will be divided into some number of parts that number is called concurrency level.

What is Concurrency

The object of ConcurrentHashMap will be divided into different segment and these segment will be Locked individually that is called  Concurrency Level.

Compare locking between Hashtable and ConcurrentHashMap

CONCURRENTHASHMAP IN JAVA






Full-stack web and mobile app development company Contact Us : Skype: indore.webcoder Email: info@w3sparks.com Sales: +91 8085506229