ConcurrentHashMap vs ReentrantReadWriteLock based Custom Map for Reloading

后端 未结 3 573
无人及你
无人及你 2021-02-04 12:24

Java Gurus,

Currently we have a HashMap which is being read frequently and modified occasionally and w

3条回答
  •  别那么骄傲
    2021-02-04 13:12

    Since you are reloading the map, I would replace it on a reload.

    You can do this by using a volatile Map, which you replace in full when it is updated.

提交回复
热议问题