public class TaskInfoImpl extends Object implements TaskInfo
Task
class in order to permit
the scheduler listener to send this class as event.
To keep an internalTask up to date, just use the org.ow2.proactive.scheduler.task.internal.InternalTask#update(TaskInfo)
method.Constructor and Description |
---|
TaskInfoImpl() |
TaskInfoImpl(TaskInfoImpl taskInfo) |
Modifier and Type | Method and Description |
---|---|
void |
decreaseNumberOfExecutionLeft()
Decrease the number of execution left.
|
void |
decreaseNumberOfExecutionOnFailureLeft()
Decrease the number of execution on failure left.
|
long |
getExecutionDuration()
Get the execution duration of the task.
|
String |
getExecutionHostName()
Get the last execution HostName of the task.
|
String[] |
getExecutionHostNameList()
To get the list of execution hosts name.
|
long |
getFinishedTime()
To get the finishedTime
|
long |
getInErrorTime()
To get the time at which the Task has been terminated for the last time (last attempt).
|
JobId |
getJobId()
To get the jobId
|
JobInfo |
getJobInfo()
To get the jobInfo
|
String |
getName()
Get the name of the task
|
int |
getNumberOfExecutionLeft()
Get the number of execution left.
|
int |
getNumberOfExecutionOnFailureLeft()
Get the numberOfExecutionOnFailureLeft value.
|
int |
getProgress()
Return the latest progress value for this task.
|
long |
getScheduledTime()
Get the scheduled time.
|
long |
getStartTime()
To get the startTime
|
TaskStatus |
getStatus()
To get the taskStatus
|
TaskId |
getTaskId()
To get the taskId
|
Map<String,String> |
getVariables()
Return the up-to-date variables associated with this task, in String format
|
String |
getVisualizationConnectionString()
If the visualization is activated, return the connection string
|
boolean |
isVisualizationActivated()
If the visualization is activated on the task
|
void |
setExecutionDuration(long executionDuration)
Set the execution duration value to the given executionDuration value
|
void |
setExecutionHostName(String executionHostName)
Set a new execution HostName.
|
void |
setFinishedTime(long finishedTime)
To set the finishedTime
|
void |
setInErrorTime(long inErrorTime) |
void |
setJobId(JobId jobId)
To set the jobId
|
void |
setJobInfo(JobInfo jobInfo)
To set the jobInfo
|
void |
setNumberOfExecutionLeft(int numberOfExecutionLeft)
Set the number of execution left.
|
void |
setNumberOfExecutionOnFailureLeft(int numberOfExecutionOnFailureLeft)
Set the initial number of execution on failure left.
|
void |
setProgress(int newValue)
To set the progress value
|
void |
setScheduledTime(long scheduledTime)
To set the scheduledTime
|
void |
setStartTime(long startTime)
To set the startTime
|
void |
setStatus(TaskStatus taskStatus)
To set the taskStatus
|
void |
setTaskId(TaskId taskId)
To set the taskId
|
void |
setVariables(Map<String,String> variables) |
void |
setVisualizationActivated(boolean visualizationActivated) |
void |
setVisualizationConnectionString(String visualizationConnectionString) |
String |
toString() |
public TaskInfoImpl()
public TaskInfoImpl(TaskInfoImpl taskInfo)
public JobInfo getJobInfo()
TaskInfo
getJobInfo
in interface TaskInfo
TaskInfo.getJobInfo()
public void setJobInfo(JobInfo jobInfo)
jobInfo
- the jobInfo to setpublic long getFinishedTime()
TaskInfo
getFinishedTime
in interface TaskInfo
TaskInfo.getFinishedTime()
public void setFinishedTime(long finishedTime)
finishedTime
- the finishedTime to setpublic void setScheduledTime(long scheduledTime)
scheduledTime
- the scheduledTime to setpublic JobId getJobId()
TaskInfo
getJobId
in interface TaskInfo
TaskInfo.getJobId()
public void setJobId(JobId jobId)
jobId
- the jobId to setpublic long getStartTime()
TaskInfo
getStartTime
in interface TaskInfo
TaskInfo.getStartTime()
public void setStartTime(long startTime)
startTime
- the startTime to setpublic long getInErrorTime()
TaskInfo
getInErrorTime
in interface TaskInfo
public void setInErrorTime(long inErrorTime)
public TaskId getTaskId()
TaskInfo
getTaskId
in interface TaskInfo
TaskInfo.getTaskId()
public String getName()
TaskInfo
getName
in interface TaskInfo
TaskInfo.getName()
public void setTaskId(TaskId taskId)
taskId
- The taskId to be set.public int getProgress()
TaskInfo
getProgress
in interface TaskInfo
TaskInfo.getProgress()
public void setProgress(int newValue)
IllegalArgumentException
- if the new value is not ranged between 0 and 100.public TaskStatus getStatus()
TaskInfo
getStatus
in interface TaskInfo
TaskInfo.getStatus()
public void setStatus(TaskStatus taskStatus)
taskStatus
- the taskStatus to setpublic String getExecutionHostName()
TaskInfo
getExecutionHostName
in interface TaskInfo
TaskInfo.getExecutionHostName()
public String[] getExecutionHostNameList()
TaskInfo
getExecutionHostNameList
in interface TaskInfo
TaskInfo.getExecutionHostNameList()
public void setExecutionHostName(String executionHostName)
executionHostName
- the execution HostName to setpublic int getNumberOfExecutionLeft()
TaskInfo
getNumberOfExecutionLeft
in interface TaskInfo
TaskInfo.getNumberOfExecutionLeft()
public void setNumberOfExecutionLeft(int numberOfExecutionLeft)
numberOfExecutionLeft
- the number of execution left to set.public int getNumberOfExecutionOnFailureLeft()
TaskInfo
getNumberOfExecutionOnFailureLeft
in interface TaskInfo
TaskInfo.getNumberOfExecutionOnFailureLeft()
public void decreaseNumberOfExecutionLeft()
public void setNumberOfExecutionOnFailureLeft(int numberOfExecutionOnFailureLeft)
numberOfExecutionOnFailureLeft
- the new number of execution to be set.public void decreaseNumberOfExecutionOnFailureLeft()
public long getExecutionDuration()
getExecutionDuration
in interface TaskInfo
public long getScheduledTime()
TaskInfo
getScheduledTime
in interface TaskInfo
TaskInfo.getScheduledTime()
public void setExecutionDuration(long executionDuration)
executionDuration
- the executionDuration to be setpublic boolean isVisualizationActivated()
isVisualizationActivated
in interface TaskInfo
public void setVisualizationActivated(boolean visualizationActivated)
public String getVisualizationConnectionString()
getVisualizationConnectionString
in interface TaskInfo
public void setVisualizationConnectionString(String visualizationConnectionString)
public Map<String,String> getVariables()
TaskInfo
getVariables
in interface TaskInfo
public String toString()
toString
in class Object
Object.toString()