This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
/** | |
* 一种本地缓存的无锁实现思路 | |
* 适用场景:预先知道的需要缓存的一批数据,比如卖家品牌授权,馆信息,达人信息 | |
* 数据更新不太频繁,定时更新或者更新由自己手动控制 | |
*/ | |
public abstract class AbstractLocalCache<K, V> { |
NewerOlder