# 发号器功能增强,对时间回撤有更强的处理能力。
1. 使用缓存存储 120 秒内的计数器。当时间回撤低于 120 秒时,到缓存中找计数器。 2. 使用 AtomicInteger 替换 synchronized 关键字保证原子性。 3. 现在性能大约每秒 13w
Showing
Please register or sign in to comment
1. 使用缓存存储 120 秒内的计数器。当时间回撤低于 120 秒时,到缓存中找计数器。 2. 使用 AtomicInteger 替换 synchronized 关键字保证原子性。 3. 现在性能大约每秒 13w