I have 8 Storm Bolt-Executors running in parallel. I have a stats cache : Map>
e.g. userVisitCache -> ( userId, (roomId, totalVisit)) any of the 8 parallel threads (Bolt Executor) , whenever finds an user in a room will increment the count and if finds outside room will decrement the count.
Now my question if I use Redisson , then is userVisitCache.get(userId).put(roomId, visitCount)
threadsafe ?
If not, then should I use userVisitCache.getLock().lock() .. to lock the cache ? In that case, should I use Redisson Read-Write Lock or just usual cache.getLock() ?