Implementing a concurrent LinkedHashMap

后端 未结 5 805
面向向阳花
面向向阳花 2021-01-04 06:15

I\'m trying to create a concurrent LinkedHashMap for a multithreaded architecture.

If I use Collections#synchronizedMap(), I would have to use synchroni

5条回答
  •  既然无缘
    2021-01-04 06:31

    Until now, my project used LRUMap from Apache Collections but it is based on SequencedHashMap. Collections proposes ListOrderedMap but none are thread-safe.

    I have switched to MapMaker from Google Guava. You can look at CacheBuilder too.

提交回复
热议问题