*/
private void extractProcessingSettings(UnboundedGridJob<?> job) {
if (job instanceof UnboundedSettingsAware) {
UnboundedSettingsAware settings = (UnboundedSettingsAware) job;
this.maxTaskConstant = settings.maxTasksInQueue();
this.reductionFactorConstant = settings.reductionFactor();
this.stopOnNullTask = settings.stopOnNullTask();
this.mutuallyExclusiveTasks = settings.mutuallyExclusiveTasks();
return;
}
Class<?> clazz = job.getClass();
// Get reference to ProcessingSettings annotation
UnboundedProcessingSettings settings = clazz.getAnnotation(UnboundedProcessingSettings.class);
// If not annotated, return
if (settings==null) return;
// If available, retrieve settings
this.maxTaskConstant = settings.maxTasksInQueue();
this.reductionFactorConstant = settings.reductionFactor();
this.stopOnNullTask = settings.stopOnNullTask();
this.mutuallyExclusiveTasks = settings.mutuallyExclusiveTasks();
log.debug("[UnboundedJobProcessor] Using Custom Processing Settings from Annotation");
}