Package org.quartz

Examples of org.quartz.TriggerKey


    @Override
    public void deleteSchedules(Id.Program program, ProgramType programType, List<String> scheduleIds) {
      Preconditions.checkNotNull(scheduler, "Scheduler not yet initialized");
      try {
        for (String scheduleId : scheduleIds) {
          scheduler.pauseTrigger(new TriggerKey(scheduleId));
        }
        String key = getJobKey(program, programType);
        scheduler.deleteJob(new JobKey(key));
      } catch (SchedulerException e) {
        throw Throwables.propagate(e);
View Full Code Here


    @Override
    public ScheduleState scheduleState(String scheduleId) {
      Preconditions.checkNotNull(scheduler, "Scheduler not yet initialized");
      try {
        Trigger.TriggerState state = scheduler.getTriggerState(new TriggerKey(scheduleId));
        // Map trigger state to schedule state.
        // This method is only interested in returning if the scheduler is
        // Paused, Scheduled or NotFound.
        switch (state) {
          case NONE:
View Full Code Here

        }
    }

    private void unregisterJob(final String jobName) {
        try {
            scheduler.getScheduler().unscheduleJob(new TriggerKey(jobName, Scheduler.DEFAULT_GROUP));
            scheduler.getScheduler().deleteJob(new JobKey(jobName, Scheduler.DEFAULT_GROUP));
        } catch (SchedulerException e) {
            LOG.error("Could not remove job " + jobName, e);
        }
View Full Code Here

    private void setExecTime(final SchedTaskTO taskTO, final Task task) {
        String triggerName = JobInstanceLoader.getTriggerName(JobInstanceLoader.getJobName(task));

        Trigger trigger = null;
        try {
            trigger = scheduler.getScheduler().getTrigger(new TriggerKey(triggerName, Scheduler.DEFAULT_GROUP));
        } catch (SchedulerException e) {
            LOG.warn("While trying to get to " + triggerName, e);
        }

        if (trigger != null) {
View Full Code Here

            final Trigger trigger = data.getTrigger();
            if (trigger == null) {
                continue;
            }

            final TriggerKey key = trigger.getKey();
            try {
                scheduler.unscheduleJob(key);
            } catch (SchedulerException ignored) {
                log.warning("An error occured deleting trigger '" + key + "' on bean " + deployment.getDeploymentID());
            }
View Full Code Here

        JobDataMap triggerDataMap = trigger.getJobDataMap();
        triggerDataMap.put(EjbTimeoutJob.EJB_TIMERS_SERVICE, this);
        triggerDataMap.put(EjbTimeoutJob.TIMER_DATA, timerData);

        try {
            if (!scheduler.checkExists(new TriggerKey(atrigger.getName(), atrigger.getGroup()))) {
                scheduler.scheduleJob(trigger);
            }
        } catch (Exception e) {
            //TODO Any other actions we could do ?
            log.warning("Could not schedule timer " + timerData, e);
View Full Code Here

        String triggerName = JobInstanceLoader.getTriggerName(JobInstanceLoader.getJobName(report));

        Trigger trigger;
        try {
            trigger = scheduler.getScheduler().getTrigger(new TriggerKey(triggerName, Scheduler.DEFAULT_GROUP));
        } catch (SchedulerException e) {
            LOG.warn("While trying to get to " + triggerName, e);
            trigger = null;
        }
View Full Code Here

   
    public Trigger getTrigger() {
       
        if (scheduler != null) {
            try {
                final TriggerKey key = new TriggerKey(trigger.getName(), trigger.getGroup());
                if (scheduler.checkExists(key)) {
                    return scheduler.getTrigger(key);
                }
            } catch (SchedulerException e) {
                return null;
View Full Code Here

   
    public Trigger getTrigger() {
       
        if (scheduler != null) {
            try {
                final TriggerKey key = new TriggerKey(trigger.getName(), trigger.getGroup());
                if (scheduler.checkExists(key)) {
                    return scheduler.getTrigger(key);
                }
            } catch (SchedulerException e) {
                return null;
View Full Code Here

            final Trigger trigger = data.getTrigger();
            if (trigger == null) {
                continue;
            }

            final TriggerKey key = trigger.getKey();
            try {
                scheduler.unscheduleJob(key);
            } catch (SchedulerException ignored) {
                log.warning("An error occured deleting trigger '" + key + "' on bean " + deployment.getDeploymentID());
            }
View Full Code Here

TOP

Related Classes of org.quartz.TriggerKey

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.