Class Job

java.lang.Object
com.decs.application.data.job.Job

public class Job extends Object
Job Class

This class represents a DECS Job. The complete process of computing a Problem in DECS is managed by the respective Job object.

Version:
1.0
Author:
Bruno Guiomar
  • Field Details

    • uniqueId

      private static AtomicInteger uniqueId
    • name

      private String name
    • id

      private int id
    • status

      private JobStatus status
    • logFile

      private File logFile
    • statsFile

      private File statsFile
    • distribution

      private DistributionType distribution
    • generationList

      private ArrayList<Generation> generationList
    • wallClockTime

      private long wallClockTime
      Wall-Clock Time in nanoseconds
    • cpuTime

      private long cpuTime
      CPU Time in nanoseconds
  • Constructor Details

    • Job

      public Job()
      Job Class default constructor
    • Job

      public Job(String name, DistributionType distribution)
      Job Class Constructor
      Parameters:
      name - Job Name
      distribution - Distribution Type
  • Method Details

    • getName

      public String getName()
    • getId

      public int getId()
    • getStatus

      public JobStatus getStatus()
    • getLogFile

      public File getLogFile()
    • getStatsFile

      public File getStatsFile()
    • getDistribution

      public DistributionType getDistribution()
    • getWallClockTime

      public long getWallClockTime()
    • getCpuTime

      public long getCpuTime()
    • setName

      public void setName(String name)
    • setId

      public void setId(int id)
    • setStatus

      public void setStatus(JobStatus status)
    • setLogFile

      public void setLogFile(File logFile)
    • setStatsFile

      public void setStatsFile(File statsFile)
    • setWallClockTime

      public void setWallClockTime(long elapsedTime)
    • setCpuTime

      public void setCpuTime(long cpuTime)
    • getJobLog

      public String getJobLog()
      Retrieves the Job log file content
      Returns:
      textual content of the Job Log file
    • getStatisticsLog

      public String getStatisticsLog()
      Retrieves the statistics log file content
      Returns:
      textual content of te stats log file
    • addGeneration

      public void addGeneration(Generation generation)
      Includes a new Generation object in the generation list
      Parameters:
      generation - generation to include
    • writeGenerationTableFile

      public void writeGenerationTableFile()
      Generates a CSV file with the information of each Generation object in the generation list
    • processLogText

      private String processLogText(String text)
      Removes the first part of ECJ's log output. This is done by replacing all text contained between a '|' and '\n' characters.
      Parameters:
      text - raw textual input
      Returns:
      the processed text