public class JobResultImpl extends Object implements JobResult
Constructor and Description |
---|
JobResultImpl()
ProActive empty constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addTaskResult(String taskName,
TaskResult taskResult,
boolean isPrecious)
-- For internal use only --
Add a new task result to this job result.
Used by the scheduler to fill your job result. |
void |
addToAllResults(String taskName)
Add this new (from replication) task result to the list of known tasks.
|
Map<String,TaskResult> |
getAllResults()
Return every task results of this job as a mapping between
user task name (in XML job description) and its task result.
User that wants to get a specific result may get this map and ask for a specific mapping or use the JobResult.getResult(String) method. |
Map<String,TaskResult> |
getExceptionResults()
Return only the task results that have generated an exception.
User that wants to get a specific result may get this map and ask for a specific mapping. |
JobId |
getJobId()
To get the id of the job corresponding to this result.
|
JobInfo |
getJobInfo()
Return the information of the corresponding job
|
String |
getName()
To get the name of the job that has generate this result.
|
Map<String,TaskResult> |
getPreciousResults()
Return only the precious results of this job as a mapping between
user task name (in XML job description) and its task result.
User that wants to get a specific result may get this map and ask for a specific mapping. |
TaskResult |
getResult(String taskName)
Return the task Result corresponding to the given name.
|
Map<String,Serializable> |
getResultMap()
Each task can contribute to this map.
|
boolean |
hadException()
Returns true if the job has generated an exception, false if not.
|
void |
removeResult(String taskName)
Remove the result of the given task in this jobResult.
|
void |
setJobInfo(JobInfo jobInfo)
Set the job info for this result
|
String |
toString() |
public JobId getJobId()
JobResult
getJobId
in interface JobResult
JobResult.getJobId()
public String getName()
JobResult
getName
in interface JobResult
JobResult.getName()
public JobInfo getJobInfo()
JobResult
getJobInfo
in interface JobResult
JobResult.getJobInfo()
public void setJobInfo(JobInfo jobInfo)
jobInfo
- the current job info to setpublic void addTaskResult(String taskName, TaskResult taskResult, boolean isPrecious)
taskName
- user define name (in XML) of the task.taskResult
- the corresponding result of the task.isPrecious
- true if this taskResult is a precious one. It will figure out in the precious result list.public void addToAllResults(String taskName)
taskName
- the name of the new task to addpublic Map<String,TaskResult> getAllResults()
JobResult
JobResult.getResult(String)
method.getAllResults
in interface JobResult
JobResult.getAllResults()
public Map<String,TaskResult> getExceptionResults()
JobResult
getExceptionResults
in interface JobResult
JobResult.getExceptionResults()
public Map<String,TaskResult> getPreciousResults()
JobResult
getPreciousResults
in interface JobResult
JobResult.getPreciousResults()
public Map<String,Serializable> getResultMap()
JobResult
getResultMap
in interface JobResult
JobResult.getResultMap()
public TaskResult getResult(String taskName) throws UnknownTaskException
JobResult
getResult
in interface JobResult
taskName
- the task name of the result to get.UnknownTaskException
- if the given task name does not exist in this jobJobResult.getResult(java.lang.String)
public boolean hadException()
JobResult
hadException
in interface JobResult
JobResult.hadException()
public void removeResult(String taskName) throws UnknownTaskException
JobResult
removeResult
in interface JobResult
taskName
- the identification name of the task.UnknownTaskException
- if the given task name does not exist in this jobJobResult.removeResult(java.lang.String)
public String toString()
toString
in class Object
Object.toString()