$darkmode
DENOPTIM
|
A task that can throw exceptions. More...
Public Member Functions | |
Task (final int id) | |
int | getId () |
void | setVerbosity (int verbosity) |
Set the verbosity: i.e., amount of log printed by this class. More... | |
void | setWorkSpace (File workDir) |
Sets the pathname of the work space, i.e., the location where the task is supposed to use move to or to threat as the result of "pwd" at runtime. More... | |
boolean | isCompleted () |
boolean | foundException () |
Throwable | getException () |
String | getErrorMessage () |
void | stopTask () |
Stop the task if not already completed. More... | |
String | toString () |
Returns a string identifying this task by its ID and reporting whether an exception has been thrown and if the tasks is completed. More... | |
void | setNotify (boolean notify) |
Public Attributes | |
Object | lock = new Object() |
Lock for addressing synchronization issues. More... | |
Protected Attributes | |
boolean | notifyGlobalTaskManager = false |
Flag controlling whether this task is expected to notify the static task manager. More... | |
boolean | completed = false |
Flag about completion. More... | |
boolean | hasException = false |
Flag about exception. More... | |
String | errMsg = "" |
Error message produced by any subtask. More... | |
Throwable | thrownExc |
Exception thrown. More... | |
int | id |
A user-assigned id for this task. More... | |
ProcessHandler | processHandler |
Executor for external bash script. More... | |
File | workDir |
The file system location where we want to be placed when doing the work. More... | |
int | verbosity = 0 |
Verbosity level. More... | |
final String | SEP = System.getProperty("file.separator") |
System-dependent file separator. More... | |
final String | NL = System.getProperty("line.separator") |
System-dependent line separator (newline) More... | |
denoptim.task.Task.Task | ( | final int | id | ) |
Definition at line 97 of file Task.java.
References denoptim.task.Task.id.
boolean denoptim.task.Task.foundException | ( | ) |
true
if an exception has been thrown within this subtask, which also includes the scenario where the executed external script returned a non-zero exit status. Definition at line 146 of file Task.java.
References denoptim.task.Task.hasException.
String denoptim.task.Task.getErrorMessage | ( | ) |
Definition at line 166 of file Task.java.
References denoptim.task.Task.errMsg.
Throwable denoptim.task.Task.getException | ( | ) |
Definition at line 156 of file Task.java.
References denoptim.task.Task.thrownExc.
int denoptim.task.Task.getId | ( | ) |
Definition at line 104 of file Task.java.
References denoptim.task.Task.id.
Referenced by denoptim.task.ParallelAsynchronousTaskExecutor.submitTask().
boolean denoptim.task.Task.isCompleted | ( | ) |
true
if the task is completed Definition at line 134 of file Task.java.
References denoptim.task.Task.completed.
Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.makeCheckPoint().
void denoptim.task.Task.setNotify | ( | boolean | notify | ) |
Definition at line 217 of file Task.java.
Referenced by denoptim.task.StaticTaskManager.submit().
void denoptim.task.Task.setVerbosity | ( | int | verbosity | ) |
Set the verbosity: i.e., amount of log printed by this class.
Definition at line 114 of file Task.java.
References denoptim.task.Task.verbosity.
void denoptim.task.Task.setWorkSpace | ( | File | workDir | ) |
Sets the pathname of the work space, i.e., the location where the task is supposed to use move to or to threat as the result of "pwd" at runtime.
Definition at line 124 of file Task.java.
References denoptim.task.Task.workDir.
void denoptim.task.Task.stopTask | ( | ) |
Stop the task if not already completed.
Definition at line 177 of file Task.java.
References denoptim.task.Task.completed, denoptim.task.Task.notifyGlobalTaskManager, denoptim.task.Task.processHandler, denoptim.task.ProcessHandler.stopProcess(), and denoptim.task.StaticTaskManager.subtractDoneTask().
Referenced by denoptim.task.StaticTaskManager.stop().
String denoptim.task.Task.toString | ( | ) |
Returns a string identifying this task by its ID and reporting whether an exception has been thrown and if the tasks is completed.
Definition at line 205 of file Task.java.
References denoptim.task.Task.completed, and denoptim.task.Task.hasException.
|
protected |
Flag about completion.
Should be set to true
only by the call() method.
Definition at line 41 of file Task.java.
Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.fragmenter.ConformerExtractorTask.call(), denoptim.fragmenter.FragmenterTask.call(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), denoptim.task.Task.isCompleted(), denoptim.task.Task.stopTask(), and denoptim.task.Task.toString().
|
protected |
Error message produced by any subtask.
Definition at line 56 of file Task.java.
Referenced by denoptim.ga.OffspringEvaluationTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), denoptim.task.Task.getErrorMessage(), denoptim.task.FitnessTask.runExternalFitness(), and denoptim.task.FitnessTask.runInternalFitness().
|
protected |
Flag about exception.
Definition at line 46 of file Task.java.
Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), denoptim.task.Task.foundException(), denoptim.task.FitnessTask.runExternalFitness(), and denoptim.task.Task.toString().
|
protected |
A user-assigned id for this task.
This id is used as a task identifier when canceling or restarting a task using the remote management functionalities.
Definition at line 68 of file Task.java.
Referenced by denoptim.fragmenter.FragmenterTask.FragmenterTask(), denoptim.task.Task.getId(), denoptim.task.ProgramTask.ProgramTask(), and denoptim.task.Task.Task().
Object denoptim.task.Task.lock = new Object() |
Lock for addressing synchronization issues.
Definition at line 51 of file Task.java.
Referenced by denoptim.task.FitnessTask.runExternalFitness().
|
protected |
System-dependent line separator (newline)
Definition at line 93 of file Task.java.
Referenced by denoptim.task.FitnessTask.runExternalFitness(), denoptim.task.FitnessTask.runInternalFitness(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), denoptim.programs.graphlisthandler.GraphListsHandler.runProgram(), denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.runProgram(), and denoptim.programs.genetweeker.GeneOpsRunner.runXOver().
|
protected |
Flag controlling whether this task is expected to notify the static task manager.
Definition at line 35 of file Task.java.
Referenced by denoptim.task.ProgramTask.call(), and denoptim.task.Task.stopTask().
|
protected |
Executor for external bash script.
Definition at line 73 of file Task.java.
Referenced by denoptim.task.FitnessTask.runExternalFitness(), and denoptim.task.Task.stopTask().
|
protected |
System-dependent file separator.
Definition at line 88 of file Task.java.
Referenced by denoptim.ga.OffspringEvaluationTask.OffspringEvaluationTask(), denoptim.task.ProgramTask.printErrorToFile(), and denoptim.combinatorial.GraphBuildingTask.sendToFitnessProvider().
|
protected |
Exception thrown.
Definition at line 61 of file Task.java.
Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), denoptim.task.ProgramTask.call(), denoptim.task.Task.getException(), denoptim.task.ProgramTask.printErrorToFile(), and denoptim.task.FitnessTask.runExternalFitness().
|
protected |
Verbosity level.
Definition at line 83 of file Task.java.
Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.combinatorial.GraphBuildingTask.GraphBuildingTask(), and denoptim.task.Task.setVerbosity().
|
protected |
The file system location where we want to be placed when doing the work.
Definition at line 78 of file Task.java.
Referenced by denoptim.task.ProgramTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.FitnessEvaluationTask(), denoptim.programs.fitnessevaluator.FitnessRunner.FitnessRunner(), denoptim.programs.fragmenter.Fragmenter.Fragmenter(), denoptim.programs.combinatorial.FragSpaceExplorer.FragSpaceExplorer(), denoptim.programs.denovo.GARunner.GARunner(), denoptim.programs.genetweeker.GeneOpsRunner.GeneOpsRunner(), denoptim.combinatorial.GraphBuildingTask.GraphBuildingTask(), denoptim.programs.grapheditor.GraphEditor.GraphEditor(), denoptim.programs.graphlisthandler.GraphListsHandler.GraphListsHandler(), denoptim.programs.isomorphism.Isomorphism.Isomorphism(), denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.MolecularModelBuilder(), denoptim.ga.OffspringEvaluationTask.OffspringEvaluationTask(), denoptim.task.ProgramTask.printErrorToFile(), denoptim.task.ProgramTask.ProgramTask(), denoptim.task.FitnessTask.runExternalFitness(), denoptim.programs.combinatorial.FragSpaceExplorer.runProgram(), denoptim.programs.denovo.GARunner.runProgram(), denoptim.programs.fitnessevaluator.FitnessRunner.runProgram(), denoptim.programs.fragmenter.Fragmenter.runProgram(), denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.runProgram(), denoptim.combinatorial.GraphBuildingTask.sendToFitnessProvider(), and denoptim.task.Task.setWorkSpace().