Search in sources :

Example 1 with TriggerInfoContext

use of io.cdap.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(io.cdap.cdap.internal.app.runtime.schedule.trigger.SatisfiableTrigger) TriggerInfo(io.cdap.cdap.api.schedule.TriggerInfo) TriggerInfoContext(io.cdap.cdap.internal.app.runtime.schedule.trigger.TriggerInfoContext)

Aggregations

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