Search in sources :

Example 1 with Trigger

use of com.vip.saturn.job.trigger.Trigger in project Saturn by vipshop.

the class AbstractElasticJob method init.

protected void init() {
    Class<? extends Trigger> triggerClass = configService.getJobType().getTriggerClass();
    Trigger trigger = null;
    try {
        trigger = triggerClass.newInstance();
        trigger.init(this);
    } catch (Exception e) {
        LogUtils.error(log, jobName, "Trigger init failed", e);
        throw new JobException(e);
    }
    scheduler = new SaturnScheduler(this, trigger);
    scheduler.start();
    getExecutorService();
}
Also used : JobException(com.vip.saturn.job.exception.JobException) SaturnScheduler(com.vip.saturn.job.trigger.SaturnScheduler) Trigger(com.vip.saturn.job.trigger.Trigger) JobException(com.vip.saturn.job.exception.JobException)

Aggregations

JobException (com.vip.saturn.job.exception.JobException)1 SaturnScheduler (com.vip.saturn.job.trigger.SaturnScheduler)1 Trigger (com.vip.saturn.job.trigger.Trigger)1