Package org.quartz

Examples of org.quartz.JobKey


        Configuration config = new MapConfiguration(props);
        JobDetail jobDetail = mock(JobDetail.class);

        String crongrp = "cron group";
        Set<JobKey> jobs = new HashSet<JobKey>();
        JobKey key = jobKey("org.candlepin.pinsetter.tasks.JobCleaner");
        jobs.add(key);

        CronTrigger cronTrigger = mock(CronTrigger.class);
        when(cronTrigger.getJobKey()).thenReturn(key);
        when(cronTrigger.getCronExpression()).thenReturn("*/7 * * * * ?");
 
View Full Code Here


        JobDetail jobDetail = mock(JobDetail.class);

        // Hack multiple job schedules for same job:
        String crongrp = "cron group";
        Set<JobKey> jobs = new HashSet<JobKey>();
        JobKey key = jobKey("org.candlepin.pinsetter.tasks.JobCleaner");
        jobs.add(key);
        JobKey key2 = jobKey("org.candlepin.pinsetter.tasks.JobCleaner2");
        jobs.add(key2);

        CronTrigger cronTrigger = mock(CronTrigger.class);
        when(cronTrigger.getJobKey()).thenReturn(key);
        when(cronTrigger.getCronExpression()).thenReturn("*/7 * * * * ?");
 
View Full Code Here

        JobDataMap map = new JobDataMap();
        map.put(PinsetterJobListener.PRINCIPAL_KEY, mock(Principal.class));
        map.put(JobStatus.TARGET_TYPE, JobStatus.TargetType.OWNER);
        map.put(JobStatus.TARGET_ID, "admin");
        JobDetailImpl detail = mock(JobDetailImpl.class);
        JobKey jobKey = jobKey("name", "group");
        when(detail.getKey()).thenReturn(jobKey);
        when(detail.getJobDataMap()).thenReturn(map);
        Mockito.doReturn(TestJob.class).when(detail).getJobClass();
        pk = new PinsetterKernel(config, jfactory, jlistener, jcurator, sfactory);
        pk.scheduleSingleJob(detail);
View Full Code Here

        Configuration config = new MapConfiguration(props);
        JobDetail jobDetail = mock(JobDetail.class);

        String crongrp = "cron group";
        Set<JobKey> jobs = new HashSet<JobKey>();
        JobKey key = jobKey("org.candlepin.pinsetter.tasks.JobCleaner");
        jobs.add(key);

        CronTrigger cronTrigger = mock(CronTrigger.class);
        when(cronTrigger.getJobKey()).thenReturn(key);
        when(cronTrigger.getCronExpression()).thenReturn("*/7 * * * * ?");
 
View Full Code Here

        JobDetail jobDetail = mock(JobDetail.class);

        // Hack multiple job schedules for same job:
        String crongrp = "cron group";
        Set<JobKey> jobs = new HashSet<JobKey>();
        JobKey key = jobKey("org.candlepin.pinsetter.tasks.JobCleaner");
        jobs.add(key);
        JobKey key2 = jobKey("org.candlepin.pinsetter.tasks.JobCleaner2");
        jobs.add(key2);

        CronTrigger cronTrigger = mock(CronTrigger.class);
        when(cronTrigger.getJobKey()).thenReturn(key);
        when(cronTrigger.getCronExpression()).thenReturn("*/7 * * * * ?");
 
View Full Code Here

        JobDataMap map = new JobDataMap();
        map.put(PinsetterJobListener.PRINCIPAL_KEY, mock(Principal.class));
        map.put(JobStatus.TARGET_TYPE, JobStatus.TargetType.OWNER);
        map.put(JobStatus.TARGET_ID, "admin");
        JobDetailImpl detail = mock(JobDetailImpl.class);
        JobKey jobKey = jobKey("name", "group");
        when(detail.getKey()).thenReturn(jobKey);
        when(detail.getJobDataMap()).thenReturn(map);
        Mockito.doReturn(TestJob.class).when(detail).getJobClass();
        pk = new PinsetterKernel(config, jfactory, jlistener, jcurator, sfactory);
        pk.scheduleSingleJob(detail);
View Full Code Here

            log.debug("No jobinfo found for job: " + ctx);
        }
    }

    private void deleteDetail(JobExecutionContext cx) {
        JobKey key = cx.getJobDetail().getKey();
        if (key.getGroup().equals(PinsetterKernel.SINGLE_JOB_GROUP)) {
            try {
                cx.getScheduler().deleteJob(key);
            }
            catch (SchedulerException e1) {
                // Should fail if the job isn't durable
View Full Code Here

        return jobClass;
    }

    @XmlTransient
    public JobKey getJobKey() {
        return new JobKey(this.getId(), this.getGroup());
    }
View Full Code Here

    }

  }// ;

  public void deleteSchedule(BatchSchedule sch) throws SchedulerException {
    JobKey jobKey = JobKey.jobKey(sch.getSchId());
    if (scheduler.checkExists(jobKey)) {
      scheduler.deleteJob(jobKey);
      logger.debug("deleteSchedule:" + sch.toTriggerString());
    }
  }// ;
View Full Code Here

        //NSSet<JobKey> scheduledJobKeysSet = new NSSet<JobKey>(scheduledJobKeys);
        //JobKey temp = scheduledJobKeysSet.anyObject();
        NSMutableSet<JobKey> jobKeys2Check = new NSMutableSet<JobKey>(jobs2Check.count());
        for (ERQSJobDescription aJob2Check : jobs2Check)
        {
          JobKey aJobKey = getJobKeyForJobDescription(aJob2Check);
          jobKeys2Check.add(aJobKey);
        }
        jobKeys2remove = scheduledJobKeysSet.setBySubtractingSet(jobKeys2Check);
      }
     
View Full Code Here

TOP

Related Classes of org.quartz.JobKey

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.