Top "Concurrenthashmap" questions

The Java ConcurrentHashMap data structure.

Print all key/value pairs in a Java ConcurrentHashMap

I am trying to simply print all key/value pair(s) in a ConcurrentHashMap. I found this code online that …

java collections hashmap concurrenthashmap
Is iterating ConcurrentHashMap values thread safe?

In javadoc for ConcurrentHashMap is the following: Retrieval operations (including get) generally do not block, so may overlap with update …

java multithreading concurrency thread-safety concurrenthashmap
Why does ConcurrentHashMap prevent null keys and values?

The JavaDoc of ConcurrentHashMap says this: Like Hashtable but unlike HashMap, this class does not allow null to be used …

java concurrenthashmap
ConcurrentHashMap in Java?

What is the use of ConcurrentHashMap in Java? What are its benefits? How does it work? Sample code would be …

java concurrenthashmap
Should you check if the map containsKey before using ConcurrentMap's putIfAbsent

I have been using Java's ConcurrentMap for a map that can be used from multiple threads. The putIfAbsent is a …

java performance concurrency concurrenthashmap
When should I use ConcurrentSkipListMap?

In Java, ConcurrentHashMap is there for better multithreading solution. Then when should I use ConcurrentSkipListMap? Is it a redundancy? Does …

java performance multithreading map concurrenthashmap
ConcurrentHashMap JDK 8 when to use computeIfPresent

The new version of Concurrent Hash Map of jdk 8 has two new Methods. computeIfAbsent computeIfPresent putIfAbsent - Old method I …

java multithreading concurrency concurrenthashmap
Is gcc std::unordered_map implementation slow? If so - why?

We are developing a highly performance critical software in C++. There we need a concurrent hash map and implemented one. …

c++ stl c++11 hashmap concurrenthashmap
ConcurrentHashMap read and write locks

I am trying to find answer to these, but not able to find it on Google or in Java docs. …

java multithreading thread-safety concurrenthashmap
Does a ConcurrentHashMap need to be wrapped in a synchronized block?

Do all non-retreival operations on a ConcurrentHashMap (put(), remove() etc.) need to be wrapped in a synchronized(this) block? I …

java synchronized concurrenthashmap