@Test public void assertBuildTrigger() { for (StatisticInterval each : StatisticInterval.values()) { taskResultStatisticJob.setStatisticInterval(each); Trigger trigger = taskResultStatisticJob.buildTrigger(); assertThat(trigger.getKey().getName(), is(TaskResultStatisticJob.class.getSimpleName() + "Trigger" + "_" + each)); } }
@Override public Trigger buildTrigger() { return TriggerBuilder.newTrigger() .withIdentity(getTriggerName() + "_" + statisticInterval) .withSchedule(CronScheduleBuilder.cronSchedule(statisticInterval.getCron()) .withMisfireHandlingInstructionDoNothing()).build(); }
TaskResultStatisticJob extends AbstractStatisticJob { @Override public Trigger buildTrigger() { return TriggerBuilder.newTrigger() .withIdentity(getTriggerName() + "_" + statisticInterval) .withSchedule(CronScheduleBuilder.cronSchedule(statisticInterval.getCron()) .withMisfireHandlingInstructionDoNothing()).build(); } }
TaskResultStatisticJob extends AbstractStatisticJob { @Override public Trigger buildTrigger() { return TriggerBuilder.newTrigger() .withIdentity(getTriggerName() + "_" + statisticInterval) .withSchedule(CronScheduleBuilder.cronSchedule(statisticInterval.getCron()) .withMisfireHandlingInstructionDoNothing()).build(); }  }
TaskResultStatisticJob extends AbstractStatisticJob { @Override public Trigger buildTrigger() { return TriggerBuilder.newTrigger() .withIdentity(getTriggerName() + "_" + statisticInterval) .withSchedule(CronScheduleBuilder.cronSchedule(statisticInterval.getCron()) .withMisfireHandlingInstructionDoNothing()).build(); }  @Override JobDetail buildJobDetail(); @Override Trigger buildTrigger(); @Override Map<String, Object> getDataMap(); @Override void execute(final JobExecutionContext context); }
TaskResultStatisticJob extends AbstractStatisticJob { @Override public Trigger buildTrigger() { return TriggerBuilder.newTrigger() .withIdentity(getTriggerName() + "_" + statisticInterval) .withSchedule(CronScheduleBuilder.cronSchedule(statisticInterval.getCron()) .withMisfireHandlingInstructionDoNothing()).build(); }  @Override JobDetail buildJobDetail(); @Override Trigger buildTrigger(); @Override Map<String, Object> getDataMap(); @Override void execute(final JobExecutionContext context);  }