yeg
2026-08-30 1c26cdb81070af7f29df4462d3bfc1ae588ff8f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.ruoyi.config;
 
import java.time.Instant;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.ruoyi.device.bts.BtsDevelopmentSimulator;
 
/** 按各采集器配置频率推进开发模拟测量,不参与正式测试数据持久化。 */
@Component
public class DevelopmentCollectorSamplingScheduler
{
    private final BtsDevelopmentSimulator simulator;
 
    public DevelopmentCollectorSamplingScheduler(BtsDevelopmentSimulator simulator)
    {
        this.simulator = simulator;
    }
 
    /** 高频检查只在采样到期时写穿 Redis,采集器之间不要求同频。 */
    @Scheduled(fixedDelay = 100)
    public void sample()
    {
        simulator.advanceCollectors(Instant.now());
    }
}