Source: dzone.com

A New Concurrent HashMap

Category: github

by java.util.concurrent.ConcurrentHashMap is fast, sophisticated, and rather complicated.

Linear probing means that if this array element is already occupied, we use the next array element.

By using compareAndSet, we make the checking for null and the setting of the new element atomic.

We do this by setting each empty array element to a special value MOVED_NULL_KEY.

Related Articles