Class MonitoredSequentialExecutor<T>
Object
org.anchoranalysis.experiment.task.processor.MonitoredSequentialExecutor<T>
- Type Parameters:
T- inputType
public class MonitoredSequentialExecutor<T> extends Object
Runs executes sequence of jobs/tasks/whatever monitoring various pieces of information - how many
have run? - how many successful/failed? - how long did execution take? - etc.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description MonitoredSequentialExecutor(Predicate<T> execFunc, Function<T,String> dscrFunc, Optional<MessageLogger> logger, boolean showHashSeperators) -
Method Summary
Modifier and Type Method Description TaskStatisticsexecuteEachWithMonitor(String logPrefix, List<T> inputs)Executes code for each element of inputs in serial, providing log-reports as to how many are finished, remain etc.
-
Constructor Details
-
Method Details
-
executeEachWithMonitor
Executes code for each element of inputs in serial, providing log-reports as to how many are finished, remain etc.- Parameters:
logPrefix- prefixed to the output of each log-messageinputs- a collection of strings that uniquely determine each input- Returns:
- statistics about the success/failure/execution-time etc. of applying the task to inputs.
-