1
2
3
4
5
6
7
8
9
10
11 package psiprobe.scheduler.triggers;
12
13 import org.springframework.beans.factory.annotation.Autowired;
14 import org.springframework.beans.factory.annotation.Value;
15 import org.springframework.scheduling.quartz.CronTriggerFactoryBean;
16
17 import psiprobe.tools.TimeExpression;
18
19
20
21
22 public class DatasourceStatsTrigger extends CronTriggerFactoryBean {
23
24
25
26
27
28
29
30 @Autowired
31 public void setCronExpression(
32 @Value("${psiprobe.beans.stats.collectors.datasource.period}") String periodExpression,
33 @Value("${psiprobe.beans.stats.collectors.datasource.phase}") String phaseExpression) {
34 super.setCronExpression(TimeExpression.cronExpression(periodExpression, phaseExpression));
35 }
36
37 }