ConcurrentHashMap
provides a Map
implementation with thread-safe read and write operations.
The Map
and ConcurrentMap
interfaces provide methods that ConcurrentHashMap takes advantage of to provide thread-safe interactions. Generally, I tend to solely really on the Map
interface as it provides most of the same methods that ConcurrentMap
has; however, depending on your use case, it might be beneficial to check out the ConcurrentMap
methods yourself.