本文整理汇总了Java中org.quartz.JobExecutionContext.getFireInstanceId方法的典型用法代码示例。如果您正苦于以下问题:Java JobExecutionContext.getFireInstanceId方法的具体用法?Java JobExecutionContext.getFireInstanceId怎么用?Java JobExecutionContext.getFireInstanceId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.quartz.JobExecutionContext
的用法示例。
在下文中一共展示了JobExecutionContext.getFireInstanceId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toCompositeData
import org.quartz.JobExecutionContext; //导入方法依赖的package包/类
/**
* @return composite data
*/
public static CompositeData toCompositeData(JobExecutionContext jec)
throws SchedulerException {
try {
return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
new Object[] {
jec.getScheduler().getSchedulerName(),
jec.getTrigger().getKey().getName(),
jec.getTrigger().getKey().getGroup(),
jec.getJobDetail().getKey().getName(),
jec.getJobDetail().getKey().getGroup(),
JobDataMapSupport.toTabularData(jec
.getMergedJobDataMap()),
jec.getTrigger().getCalendarName(),
jec.isRecovering(),
jec.getRefireCount(),
jec.getFireTime(), jec.getScheduledFireTime(),
jec.getPreviousFireTime(), jec.getNextFireTime(),
jec.getJobRunTime(),
jec.getFireInstanceId() });
} catch (OpenDataException e) {
throw new RuntimeException(e);
}
}
示例2: getInitialHistorianEntry
import org.quartz.JobExecutionContext; //导入方法依赖的package包/类
private HistorianEntry getInitialHistorianEntry(JobExecutionContext context) {
String contextKey = context.get(CONTEXT_KEY).toString();
TriggerKey triggerKey = context.getTrigger().getKey();
NameAndGroup current = new NameAndGroup(triggerKey.getName(), triggerKey.getGroup());
List<NameAndGroup> previouses = afterDAO.getPreviousTriggersByKey(current);
List<String> prevTriggersFireKeys = historianDAO.readEntriesByContext(contextKey).stream().filter(e -> previouses.contains(e.getTriggerKey()))
.map(HistorianEntry::getFireKey).collect(Collectors.toList());
return new HistorianEntry(schedulerName, schedulerInstanceId, contextKey, context.getFireInstanceId(),
current, prevTriggersFireKeys, Instant.now(clock), null, context.getTrigger().getJobDataMap(), null, ExecutionStatus.FIRED, null);
}