本文整理了Java中org.quartz.Trigger.mayFireAgain()
方法的一些代码示例,展示了Trigger.mayFireAgain()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Trigger.mayFireAgain()
方法的具体详情如下:
包路径:org.quartz.Trigger
类名称:Trigger
方法名:mayFireAgain
[英]Used by the Scheduler
to determine whether or not it is possible for this Trigger
to fire again.
If the returned value is false
then the Scheduler
may remove the Trigger
from the org.quartz.spi.JobStore
.
[中]由Scheduler
使用,以确定该Trigger
是否可能再次发射。
如果返回值为false
,则Scheduler
可以从org.quartz.spi.JobStore
中删除Trigger
。
代码示例来源:origin: apache/incubator-gobblin
Assert.assertNotNull(scheduler._scheduler.getScheduler().getJobDetail(qjss1.getQuartzTrigger().getJobKey()));
Assert.assertNotNull(scheduler._scheduler.getScheduler().getTrigger(qjss1.getQuartzTrigger().getKey()));
Assert.assertTrue(qjss1.getQuartzTrigger().mayFireAgain());
代码示例来源:origin: org.projectodd.wunderboss/wunderboss-scheduling
public void triggerComplete(Trigger trigger, JobExecutionContext ctx, Trigger.CompletedExecutionInstruction i) {
if (!trigger.mayFireAgain()) {
synchronized(QuartzScheduling.this) {
QuartzScheduling.this.currentJobs.remove(ctx.getJobDetail().getKey());
}
}
}
}
代码示例来源:origin: ch.exense.step/core
public boolean schedule(ExecutiontTaskParameters task) {
JobKey key = new JobKey(task.getId().toString());
try {
if(scheduler.checkExists(key)) {
deleteSchedule(task);
}
} catch (SchedulerException e) {
logger.error("An error occurred while checking if task exists in scheduler: " + task);
throw new RuntimeException(e);
}
Trigger trigger = TriggerBuilder.newTrigger().withSchedule(CronScheduleBuilder.cronSchedule(task.getCronExpression())).build();
JobDetail job = buildScheduledJob(task);
scheduleJob(trigger, job);
return trigger.mayFireAgain();
}
代码示例来源:origin: org.motechproject/motech-scheduler
Trigger trigger = jobExecutionContext.getTrigger();
motechEvent.setEndTime(trigger.getEndTime())
.setLastEvent(!trigger.mayFireAgain());
内容来源于网络,如有侵权,请联系作者删除!