Package com.elitesland.ystdms.sys.config
Class ThreadPoolMonitor
java.lang.Object
com.elitesland.ystdms.sys.config.ThreadPoolMonitor
@Component
@ConditionalOnProperty(prefix="yst.thread-pool.monitor",
name="enabled",
havingValue="true",
matchIfMissing=true)
public class ThreadPoolMonitor
extends Object
定期输出线程池与 JVM 线程、发号缓存指标,便于发现 CPU 飙高与队列堆积。
-
Constructor Summary
ConstructorsConstructorDescriptionThreadPoolMonitor(ThreadPoolProperties properties, org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor taskExecutor, org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor operationLogExecutor, org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor archiveExecutor, org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor sequencePreloadExecutor, SequenceMetricsProvider sequenceMetrics) -
Method Summary
-
Constructor Details
-
ThreadPoolMonitor
public ThreadPoolMonitor(ThreadPoolProperties properties, @Qualifier("taskExecutor") org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor taskExecutor, @Qualifier("operationLogExecutor") org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor operationLogExecutor, @Qualifier("archiveExecutor") org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor archiveExecutor, @Qualifier("sequencePreloadExecutor") org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor sequencePreloadExecutor, @Autowired(required=false) SequenceMetricsProvider sequenceMetrics)
-
-
Method Details
-
logPoolStats
@Scheduled(fixedDelayString="${yst.thread-pool.monitor.interval-seconds:60}000") public void logPoolStats()
-