I am using Redisson in a Java environment to make certain data structures distributed so that they can all be accessed from multiple Tomcat instances, in a multi threaded environment.
I plan to have a nested map data structure defined as below:
protected RMap<String, ConcurrentHashMap<String, ConcurrentHashMap<String, Object >>> aMap = new ConcurrentHashMap<>();
As per the Redisson documentation, the RMap is thread safe by default.However I'm not sure what will happen when I'm modifying one of the ConcurrentHashMaps instances nested inside the RMap.Is having Concurrent hash maps inside an RMap a good practice in general to do when using Redisson? Am I paving way for unforeseen concurrency related issues by this approach? If not, what is a better approach?Thanks.