Java ConcurrentHashMap With Examples

ConcurrentHashMap in Java is a thread safe Map implementation which provides another alternative to be used in a multithreaded environment apart from HashTable or explicitly synchronizing HashMap. ConcurrentHashMap is part of the java.util.concurrent package. Table of contents How is ConcurrentHashMap a better option Internal implementation of ConcurrentHashMap in Java Java…

Continue reading

Java ConcurrentSkipListMap With Examples

This post talks about the ConcurrentSkipListMap class from the java.util.concurrent package and the interface ConcurrentNavigableMap this class implements. ConcurrentSkipListMap in Java ConcurrentSkipListMap is a thread-safe, scalable Map that stores its elements in sorted manner. By default map is sorted according to the natural ordering of its keys, or by a…

Continue reading