Package org.quartz

Examples of org.quartz.TriggerKey


          .startAt(date)
          .forJob(jobDetail)
          .build();     
    log.debug("Job key: {} Trigger key: {}", trigger.getJobKey(), trigger.getKey());
    // store keys by name
    TriggerKey tKey = trigger.getKey();
    JobKey jKey = trigger.getJobKey();
    log.debug("Job key: {} Trigger key: {}", jKey, tKey);
    ScheduledJobKey key = new ScheduledJobKey(tKey, jKey);
    keyMap.put(name, key);   
    // schedule   
View Full Code Here


          .withSchedule(SimpleScheduleBuilder.simpleSchedule()
              .withIntervalInMilliseconds(interval)
              .repeatForever())
          .build();   
    // store keys by name
    TriggerKey tKey = trigger.getKey();
    JobKey jKey = trigger.getJobKey();
    log.debug("Job key: {} Trigger key: {}", jKey, tKey);
    ScheduledJobKey key = new ScheduledJobKey(tKey, jKey);
    keyMap.put(name, key);
    // schedule
View Full Code Here

        while (collision) {
            try {
                resources.getJobStore().storeTrigger(trig, false);
                collision = false;
            } catch (ObjectAlreadyExistsException oaee) {
                trig.setKey(new TriggerKey(newTriggerId(), Scheduler.DEFAULT_GROUP));
            }
        }

        notifySchedulerThread(trig.getNextFireTime().getTime());
        notifySchedulerListenersSchduled(trig);
View Full Code Here

        while (collision) {
            try {
                resources.getJobStore().storeTrigger(trig, false);
                collision = false;
            } catch (ObjectAlreadyExistsException oaee) {
                trig.setKey(new TriggerKey(newTriggerId(), Scheduler.DEFAULT_GROUP));
            }
        }

        notifySchedulerThread(trig.getNextFireTime().getTime());
        notifySchedulerListenersSchduled(trig);
View Full Code Here

                }
                invokeSetter(jobDetail, key, value);
            }
   
            AbstractTrigger<?> at = (AbstractTrigger<?>)trigger;
            at.setKey(new TriggerKey(at.getName(), at.getGroup()));
           
            Date startDate = at.getStartTime();
            if(startDate == null || startDate.before(new Date())) {
                at.setStartTime(new Date());
            }
View Full Code Here

                }
                invokeSetter(trigger, key, value);
            }
           
            AbstractTrigger<?> at = (AbstractTrigger<?>)trigger;
            at.setKey(new TriggerKey(at.getName(), at.getGroup()));
           
            Date startDate = at.getStartTime();
            if(startDate == null || startDate.before(new Date())) {
                at.setStartTime(new Date());
            }
View Full Code Here

        }
    }

    public String getTriggerState(String triggerName, String triggerGroupName) throws Exception {
        try {
            TriggerKey triggerKey = triggerKey(triggerName, triggerGroupName);
            TriggerState ts = scheduler.getTriggerState(triggerKey);
            return ts.name();
        } catch (Exception e) {
            throw newPlainException(e);
        }
View Full Code Here

            JobKey jobKey = jobKey(jobName, jobGroup);
            JobDetail jobDetail = scheduler.getJobDetail(jobKey);
            if (jobDetail == null) {
                throw new IllegalArgumentException("No such job: " + jobKey);
            }
            TriggerKey triggerKey = triggerKey(triggerName, triggerGroup);
            Trigger trigger = scheduler.getTrigger(triggerKey);
            if (trigger == null) {
                throw new IllegalArgumentException("No such trigger: " + triggerKey);
            }
            return scheduler.scheduleJob(jobDetail, trigger);
View Full Code Here

        trigger.setStartTime(startTime);
        trigger.setEndTime((Date) cData.get("endTime"));
        if(cData.containsKey("misfireInstruction")) {
            trigger.setMisfireInstruction(((Integer)cData.get("misfireInstruction")).intValue());
        }
        trigger.setKey(new TriggerKey((String) cData.get("name"), (String) cData.get("group")));
        trigger.setJobKey(new JobKey((String) cData.get("jobName"), (String) cData.get("jobGroup")));
    }
View Full Code Here

            trigger.setEndTime((Date) attrMap.get("endTime"));
        }
        if(attrMap.containsKey("misfireInstruction")) {
            trigger.setMisfireInstruction(((Integer)attrMap.get("misfireInstruction")).intValue());
        }
        trigger.setKey(new TriggerKey((String) attrMap.get("name"), (String) attrMap.get("group")));
        trigger.setJobKey(new JobKey((String) attrMap.get("jobName"), (String) attrMap.get("jobGroup")));
    }
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.