Package adams.multiprocess
Interface Job
-
- All Superinterfaces:
CleanUpHandler
,LoggingSupporter
,Serializable
,Stoppable
,StoppableWithFeedback
- All Known Subinterfaces:
JobWithOwner<T>
- All Known Implementing Classes:
AbstractBaselineCorrection.BaselineCorrectionJob
,AbstractClassifierBasedGeneticAlgorithm.ClassifierBasedGeneticAlgorithmJob
,AbstractClassifierBasedGeneticAlgorithmWithSecondEvaluation.ClassifierBasedGeneticAlgorithmWithSecondEvaluationJob
,AbstractDenoiser.DenoiserJob
,AbstractExperiment.AbstractExperimentJob
,AbstractFilter.FilterJob
,AbstractGeneticAlgorithm.GeneticAlgorithmJob
,AbstractJob
,AbstractOutlierDetector.DetectorJob
,AbstractSmoother.SmootherJob
,ArrayProcess.ArrayElementJob
,CrossValidationExperiment.CrossValidationExperimentJob
,DarkLord.DarkLordJob
,GeneticAlgorithm.GAJob
,Hermione.HermioneJob
,SpreadSheetFilter.FilterJob
,TrainTestSplitExperiment.TrainTestSplitExperimentJob
,WekaClassifierRanker.RankingJob
,WekaCrossValidationJob
,WekaFilter.BatchFilterJob
,WekaTestSetEvaluator.EvaluateJob
,WekaTrainAssociator.TrainJob
,WekaTrainClassifier.BatchTrainJob
,WekaTrainClusterer.BatchTrainJob
,WekaTrainTestSetEvaluator.EvaluateJob
public interface Job extends Serializable, LoggingSupporter, StoppableWithFeedback, CleanUpHandler
A job is a unit of execution.- Version:
- $Revision: 11631 $
- Author:
- dale
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.JobResult
execute()
Override to do computation.String
getExecutionError()
Returns the execution error, if any.JobCompleteListener
getJobCompleteListener()
Returns the listener that gets notified when the job got finished.String
getJobInfo()
Returns the job info/identifier.boolean
hasExecutionError()
Checks whether there was a problem with the job execution.boolean
isComplete()
Whether the job has been finished.void
jobCompleted(Job j, JobResult jr)
Called once a job has completed execution.void
setJobCompleteListener(JobCompleteListener l)
Sets the listener that gets notified when the job got finished.-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.Stoppable
stopExecution
-
Methods inherited from interface adams.core.StoppableWithFeedback
isStopped
-
-
-
-
Method Detail
-
getJobInfo
String getJobInfo()
Returns the job info/identifier.- Returns:
- the info
-
jobCompleted
void jobCompleted(Job j, JobResult jr)
Called once a job has completed execution.- Parameters:
j
- Jobjr
- Result of Job
-
setJobCompleteListener
void setJobCompleteListener(JobCompleteListener l)
Sets the listener that gets notified when the job got finished.- Parameters:
l
- the listener
-
getJobCompleteListener
JobCompleteListener getJobCompleteListener()
Returns the listener that gets notified when the job got finished.- Returns:
- the listener, can be null
-
isComplete
boolean isComplete()
Whether the job has been finished.- Returns:
- true if the job has finished, false otherwise
-
execute
JobResult execute()
Override to do computation.- Returns:
- JobResult
-
hasExecutionError
boolean hasExecutionError()
Checks whether there was a problem with the job execution.- Returns:
- true if an error occurred
-
getExecutionError
String getExecutionError()
Returns the execution error, if any.- Returns:
- the error, null if none occurred
-
cleanUp
void cleanUp()
Cleans up data structures, frees up memory. Removes dependencies and job parameters.- Specified by:
cleanUp
in interfaceCleanUpHandler
-
-