Search in sources :

Example 1 with TriggerInfoContext

use of co.cask.cdap.internal.app.runtime.schedule.trigger.TriggerInfoContext in project cdap by caskdata.

the class ScheduleTaskRunner method getTriggeringScheduleInfo.

private TriggeringScheduleInfo getTriggeringScheduleInfo(Job job) {
    TriggerInfoContext triggerInfoContext = new TriggerInfoContext(job, store);
    SatisfiableTrigger trigger = ((SatisfiableTrigger) job.getSchedule().getTrigger());
    List<TriggerInfo> triggerInfo = trigger.getTriggerInfos(triggerInfoContext);
    ProgramSchedule schedule = job.getSchedule();
    return new DefaultTriggeringScheduleInfo(schedule.getName(), schedule.getDescription(), triggerInfo, schedule.getProperties());
}
Also used : SatisfiableTrigger(co.cask.cdap.internal.app.runtime.schedule.trigger.SatisfiableTrigger) TriggerInfo(co.cask.cdap.api.schedule.TriggerInfo) TriggerInfoContext(co.cask.cdap.internal.app.runtime.schedule.trigger.TriggerInfoContext)

Aggregations

TriggerInfo (co.cask.cdap.api.schedule.TriggerInfo)1 SatisfiableTrigger (co.cask.cdap.internal.app.runtime.schedule.trigger.SatisfiableTrigger)1 TriggerInfoContext (co.cask.cdap.internal.app.runtime.schedule.trigger.TriggerInfoContext)1