Package org.jppf.management
Class TaskInformation
java.lang.Object
org.jppf.management.TaskInformation
- All Implemented Interfaces:
Serializable
Instances of this class encapsulate runtime information on tasks executed by a node.
- Author:
- Laurent Cohen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTaskInformation(String id, String jobId, String jobName, long cpuTime, long elapsedTime, boolean error, int jobPosition) Initialize this event object with the specified task. -
Method Summary
Modifier and TypeMethodDescriptionlongGet the cpu time taken by the task.longGet the wall clock time taken by the task.getId()Get the task id.getJobId()Get the id of the job this task belongs to.Get the name of the job this task belongs to.intGet the position of the task in the job to which it belongs.longGet the timestamp for the creation of this event.booleanhasError()Determines whether the task had an exception.toString()
-
Constructor Details
-
TaskInformation
public TaskInformation(String id, String jobId, String jobName, long cpuTime, long elapsedTime, boolean error, int jobPosition) Initialize this event object with the specified task.- Parameters:
id- the task id.jobId- the id of the job this task belongs to.jobName- the name of the job this task belongs to.cpuTime- the cpu time taken by the task.elapsedTime- the wall clock time taken by the task.error- determines whether the task had an exception.jobPosition- the position of the task in the job to which it belongs..
-
-
Method Details
-
getId
Get the task id.- Returns:
- the id as a string.
-
getJobId
Get the id of the job this task belongs to.- Returns:
- the job id as a string.
-
getJobName
Get the name of the job this task belongs to.- Returns:
- the job name as a string.
-
getCpuTime
public long getCpuTime()Get the cpu time taken by the task.- Returns:
- the cpu time in milliseconds.
-
getElapsedTime
public long getElapsedTime()Get the wall clock time taken by the task.- Returns:
- the elapsed time in milliseconds.
-
hasError
public boolean hasError()Determines whether the task had an exception.- Returns:
- true if the task had an exception, false otherwise.
-
getTimestamp
public long getTimestamp()Get the timestamp for the creation of this event.- Returns:
- the timestamp as a long value.
-
getJobPosition
public int getJobPosition()Get the position of the task in the job to which it belongs.- Returns:
- the position of the task in its job as an int value.
- Since:
- 5.0
-
toString
-