Class DebugDependentProcessor<T extends InputFromManager,S>
- Type Parameters:
T- input-object typeS- shared-object state
- All Implemented Interfaces:
ReplaceTask<T,S>
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckMisconfigured(BeanInstanceMap defaultInstances) Checks that a bean's properties conform to expectations.protected TaskStatisticsexecute(Outputter rootOutputter, List<T> inputs, ParametersExperiment parametersExperiment) Executes the task on allinputs.intHow many processors to avoid using for the tasks.intAn upper limit on the number of the processors that can be simultaneously used in parallel, if they are available.voidsetKeepProcessorsFree(int keepProcessorsFree) How many processors to avoid using for the tasks.voidsetMaxNumberProcessors(int maxNumberProcessors) An upper limit on the number of the processors that can be simultaneously used in parallel, if they are available.Methods inherited from class org.anchoranalysis.experiment.bean.processor.JobProcessor
executeLogStatistics, getTask, hasVeryQuickPerInputExecution, isInputCompatibleWith, isSuppressExceptions, replaceTask, setSuppressExceptions, setTaskMethods inherited from class org.anchoranalysis.bean.AnchorBean
describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
DebugDependentProcessor
public DebugDependentProcessor()
-
-
Method Details
-
checkMisconfigured
Description copied from class:AnchorBeanChecks that a bean's properties conform to expectations.- Overrides:
checkMisconfiguredin classAnchorBean<JobProcessor<T extends InputFromManager,S>> - Parameters:
defaultInstances- all available default instances if theDefaultInstanceannotation is used- Throws:
BeanMisconfiguredException- if the bean has not been configured properly as XML
-
execute
protected TaskStatistics execute(Outputter rootOutputter, List<T> inputs, ParametersExperiment parametersExperiment) throws ExperimentExecutionException Description copied from class:JobProcessorExecutes the task on allinputs.It is expected that elements are removed from
inputsas they are consumed so as to allow garbage-collection of these items before all jobs are processed (as the list might be quite large).- Specified by:
executein classJobProcessor<T extends InputFromManager,S> - Parameters:
rootOutputter- an outputter, bound to the base (root) output directory into which outputted files are written.inputs- the inputs to applytaskon.parametersExperiment- parameters that exist pertaining to the experiment that is underway.- Returns:
- statistics about the success/failure/execution-time etc. of applying the task to inputs.
- Throws:
ExperimentExecutionException- if anything goes wrong executing the experiment (but not necessarily if a processing a particular input fails whensuppressExceptions == true.
-
getMaxNumberProcessors
public int getMaxNumberProcessors()An upper limit on the number of the processors that can be simultaneously used in parallel, if they are available.If the current
ParametersExperimentsuggests an alternative maximum, it is afforded precedence over this property. -
setMaxNumberProcessors
public void setMaxNumberProcessors(int maxNumberProcessors) An upper limit on the number of the processors that can be simultaneously used in parallel, if they are available.If the current
ParametersExperimentsuggests an alternative maximum, it is afforded precedence over this property. -
getKeepProcessorsFree
public int getKeepProcessorsFree()How many processors to avoid using for the tasks.When using the maximum available number of processors, a certain amount are deliberately not used, to save them for other tasks on the operating system. This is particularly valuable on a desktop PC where other tasks (e.g web browsing) may be ongoing during processing.
-
setKeepProcessorsFree
public void setKeepProcessorsFree(int keepProcessorsFree) How many processors to avoid using for the tasks.When using the maximum available number of processors, a certain amount are deliberately not used, to save them for other tasks on the operating system. This is particularly valuable on a desktop PC where other tasks (e.g web browsing) may be ongoing during processing.
-