读quartz中的JobBuilder

private JobBuilder() {
}
public static JobBuilder newJob() {
return new JobBuilder();
}

目的是为了产生JobDetail

public JobDetail build() {

JobDetailImpl job = new JobDetailImpl();

job.setJobClass(jobClass);

job.setDescription(description);
if(key == null)
key = new JobKey(Key.createUniqueName(null), null);
job.setKey(key);
job.setDurability(durability);
job.setRequestsRecovery(shouldRecover);
if(!jobDataMap.isEmpty())
job.setJobDataMap(jobDataMap);

return job;
}

你可能感兴趣的:(读quartz中的JobBuilder)