@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; }
/** * @return whether the associated Job class carries the {@link DisallowConcurrentExecution} annotation. */ public boolean isConcurrentExectionDisallowed() { return ClassUtils.isAnnotationPresent(jobClass, DisallowConcurrentExecution.class); }
@Override public boolean isConcurrentExectionDisallowed() { return owner.getAnnotation(DisallowConcurrentExecution.class) != null; }
public static boolean isDisallowConcurrentExecution(Class<?> jobClass) { return getAnnotation(jobClass, DisallowConcurrentExecution.class) != null; }