/** * @return whether the associated Job class carries the {@link PersistJobDataAfterExecution} annotation. */ public boolean isPersistJobDataAfterExecution() { return ClassUtils.isAnnotationPresent(jobClass, PersistJobDataAfterExecution.class); }
/** * @return whether the associated Job class carries the {@link PersistJobDataAfterExecution} annotation. */ public boolean isPersistJobDataAfterExecution() { return ClassUtils.isAnnotationPresent(jobClass, PersistJobDataAfterExecution.class); }
/** * @return whether the associated Job class carries the {@link DisallowConcurrentExecution} annotation. */ public boolean isConcurrentExectionDisallowed() { return ClassUtils.isAnnotationPresent(jobClass, DisallowConcurrentExecution.class); }
/** * @return whether the associated Job class carries the {@link DisallowConcurrentExecution} annotation. */ public boolean isConcurrentExectionDisallowed() { return ClassUtils.isAnnotationPresent(jobClass, DisallowConcurrentExecution.class); }
@SuppressWarnings("unchecked") private boolean isPersistJobDataAfterExecution(String jobClassName) { boolean persistJobDataAfterExecution = false; try { Class<Job> jobClass = (Class<Job>) loadHelper.getClassLoader().loadClass(jobClassName); persistJobDataAfterExecution = ClassUtils.isAnnotationPresent(jobClass, PersistJobDataAfterExecution.class); } catch (Exception ex) { log.error("could not determine whether class: " + jobClassName + " is PersistJobDataAfterExecution annotated"); } return persistJobDataAfterExecution; }
@SuppressWarnings("unchecked") private boolean isJobConcurrentExectionDisallowed(String jobClassName) { boolean jobConcurrentExectionDisallowed = false; try { Class<Job> jobClass = (Class<Job>) loadHelper.getClassLoader().loadClass(jobClassName); jobConcurrentExectionDisallowed = ClassUtils.isAnnotationPresent(jobClass, DisallowConcurrentExecution.class); } catch (Exception ex) { log.error("could not determine whether class: " + jobClassName + " is JobConcurrentExectionDisallowed annotated"); } return jobConcurrentExectionDisallowed; }