abstract class Task
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
level |
protected java.lang.String |
name
The name of the job.
|
(package private) static char |
nameParSep
Hyphen is used to separate job name and parameter string.
|
private static java.lang.String |
normalEx
This is the pattern for a non-word character.
|
protected java.lang.String |
param
The parameters to the job.
|
protected Node |
parent
The parent job or this job.
|
private static java.lang.String |
repEx
Underscore is used to replace all non-word characters in job parameters.
|
private Status |
stat
The status of this job, which is used to communicate to the parent task.
|
private java.lang.String |
strRep
The String representation of this Task.
|
Constructor and Description |
---|
Task(Node parent,
java.lang.String name,
java.lang.String param)
Construct a job and set its status to READY.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Status |
advance()
Check the current status assuming the last update had status RUNNING.
|
protected java.lang.String |
debugDump()
Dump the current state of the job.
|
protected abstract java.lang.String |
dumpMore() |
(package private) static java.lang.String |
extractTaskName(java.io.File path) |
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> |
fetchAncestry()
Fetch the the ancestry info of the job.
|
private void |
formStrRep() |
(package private) int |
getLevel() |
(package private) java.lang.String |
getName()
Get the name of the job.
|
(package private) java.lang.String |
getParam()
Get the parameters of the job.
|
(package private) Status |
getStatus() |
protected boolean |
hasSucceededLast()
For a resumed run, test if this job has completed in the previous run.
|
(package private) void |
ignore() |
(package private) void |
kill()
Try to stop the job assuming it has not successfully finished.
|
(package private) void |
markFail() |
protected abstract void |
terminate()
Forcibly terminate this job.
|
java.lang.String |
toString()
Get the string representation of the job.
|
(package private) Status |
updateStatus()
Obtain the status of the task.
|
private void |
updateStatusImpl() |
private static final java.lang.String normalEx
private static final java.lang.String repEx
static final char nameParSep
private Status stat
protected java.lang.String name
private java.lang.String strRep
protected java.lang.String param
protected Node parent
private int level
Task(Node parent, java.lang.String name, java.lang.String param) throws java.lang.Exception
java.lang.Exception
java.lang.String getName()
name
java.lang.String getParam()
param
int getLevel()
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> fetchAncestry()
private void formStrRep()
public java.lang.String toString()
toString
in class java.lang.Object
Status getStatus()
void ignore()
void markFail()
Status updateStatus()
private void updateStatusImpl() throws java.lang.Exception
java.lang.Exception
protected boolean hasSucceededLast() throws java.lang.Exception
java.lang.Exception
void kill()
static java.lang.String extractTaskName(java.io.File path)
protected java.lang.String debugDump()
protected abstract java.lang.String dumpMore()
protected abstract Status advance() throws java.lang.Exception
java.lang.Exception
protected abstract void terminate()
Copyright © 2006-2015 Heng Sun.