4 ms·
It sounds like you are describing ConcurrentHashMap (using ehcache or ConcurrentHashMap+putIfAbsent is almost always the right choice for shared access in my o
by timf 17y ago
It sounds like you are describing ConcurrentHashMap
(using ehcache or ConcurrentHashMap+putIfAbsent is almost always the right choice for shared access in my opinion, unless you can prove there is a bottleneck)
- timf 17y agoor something like this if you truly need a very high read rate and can stand updates not being reflected immediately: http://mina.apache.org/report/trunk/apidocs/org/apache/mina/util/CopyOnWriteMap.html http://mina.apache.org/report/trunk/apidocs/org/apache/mina/... (although I believe ehcache can do this, ehcache is so tested and widely used that I would seriously look there first)