In my application I would be using a Map.
- Multiple threads would be writing data to this map. The write operations are too many.
- However, the data that is fed to the map has a different key during every write.
- The data in the map would not be read at any point in the application.
- Once in a while, the content would be dumped to a file.
I would like to know the following :
- In this case, would it be necessary to synchronize the write method?
- Does a ConcurrentHashMap suit my needs?
- If not, what would be the right Map implementation to use in this case?