I am using TreeMap
to get tailMap
, but its causing concurrency issues. So I decided to use ConcurrentHashMap
instead. How do I get tailMap
for ConcurrentHashMap
?
There isn't any API like map.tailMap(key)
for ConcurrentHashMap
.
Thanks
I am using TreeMap
to get tailMap
, but its causing concurrency issues. So I decided to use ConcurrentHashMap
instead. How do I get tailMap
for ConcurrentHashMap
?
There isn't any API like map.tailMap(key)
for ConcurrentHashMap
.
Thanks
That method is defined in the interface SortedMap, so you need to use a map that implements that interface. The likely concurrent candidate is ConcurrentSkipListMap.