High-performance Concurrent MultiMap Java/Scala

后端 未结 10 1297
無奈伤痛
無奈伤痛 2020-12-12 15:42

I am looking for a high-performance, concurrent, MultiMap. I have searched everywhere but I simply cannot find a solution that uses the same approach as ConcurrentHashMap (O

10条回答
  •  我在风中等你
    2020-12-12 16:08

    I am a bit late on this topic but I think, nowadays, you can use Guava like this:

    Multimaps.newSetMultimap(new ConcurrentHashMap<>(), ConcurrentHashMap::newKeySet)
    

提交回复
热议问题