Package org.qzerver.model.service.job.executor

Examples of org.qzerver.model.service.job.executor.ScheduleJobExecutorService


        schedulerFactoryBean.setQuartzProperties(properties);
        schedulerFactoryBean.afterPropertiesSet();

        queue = new LinkedBlockingQueue<AutomaticJobExecutionParameters>();

        ScheduleJobExecutorService scheduleJobExecutorService = new ScheduleJobExecutorServiceMock(queue);

        QzerverJobListener qzerverJobListener = new QzerverJobListener();
        qzerverJobListener.setExecutorService(scheduleJobExecutorService);

        scheduler = schedulerFactoryBean.getObject();
View Full Code Here


        if (!QzerverKeyUtils.isQzerverJob(jobKey)) {
            LOGGER.warn("Unknown job [name={}, group={}] is fired", jobKey.getName(), jobKey.getGroup());
            return;
        }

        ScheduleJobExecutorService executorService =
            (ScheduleJobExecutorService) context.get(QzerverJobListener.SERVICE_NAME);
        Preconditions.checkNotNull(executorService, "Executor service is not set");

        long scheduleJobId = QzerverKeyUtils.parseJobName(jobKey);

        AutomaticJobExecutionParameters parameters = new AutomaticJobExecutionParameters();
        parameters.setFiredTime(context.getFireTime());
        parameters.setScheduledTime(context.getScheduledFireTime());
        parameters.setNextFireTime(context.getNextFireTime());

        try {
            executorService.executeAutomaticJob(scheduleJobId, parameters);
        } catch (Exception e) {
            LOGGER.error("Fail to execute job with id : " + scheduleJobId, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.qzerver.model.service.job.executor.ScheduleJobExecutorService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.