Class TaskInformation

java.lang.Object
org.jppf.management.TaskInformation
All Implemented Interfaces:
Serializable

public class TaskInformation extends Object implements Serializable
Instances of this class encapsulate runtime information on tasks executed by a node.
Author:
Laurent Cohen
See Also:
  • 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

      public String getId()
      Get the task id.
      Returns:
      the id as a string.
    • getJobId

      public String getJobId()
      Get the id of the job this task belongs to.
      Returns:
      the job id as a string.
    • getJobName

      public 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

      public String toString()
      Overrides:
      toString in class Object