Package com.decs.application.data.job
Class Job
java.lang.Object
com.decs.application.data.job.Job
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 Summary
FieldsModifier and TypeFieldDescriptionprivate longCPU Time in nanosecondsprivate DistributionTypeprivate ArrayList<Generation> private intprivate Fileprivate Stringprivate Fileprivate JobStatusprivate static AtomicIntegerprivate longWall-Clock Time in nanoseconds -
Constructor Summary
ConstructorsConstructorDescriptionJob()Job Class default constructorJob(String name, DistributionType distribution) Job Class Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGeneration(Generation generation) Includes a new Generation object in the generation listlongintgetId()Retrieves the Job log file contentgetName()Retrieves the statistics log file contentlongprivate StringprocessLogText(String text) Removes the first part of ECJ's log output.voidsetCpuTime(long cpuTime) voidsetId(int id) voidsetLogFile(File logFile) voidvoidsetStatsFile(File statsFile) voidvoidsetWallClockTime(long elapsedTime) voidGenerates a CSV file with the information of each Generation object in the generation list
-
Field Details
-
uniqueId
-
name
-
id
private int id -
status
-
logFile
-
statsFile
-
distribution
-
generationList
-
wallClockTime
private long wallClockTimeWall-Clock Time in nanoseconds -
cpuTime
private long cpuTimeCPU Time in nanoseconds
-
-
Constructor Details
-
Job
public Job()Job Class default constructor -
Job
Job Class Constructor- Parameters:
name- Job Namedistribution- Distribution Type
-
-
Method Details
-
getName
-
getId
public int getId() -
getStatus
-
getLogFile
-
getStatsFile
-
getDistribution
-
getWallClockTime
public long getWallClockTime() -
getCpuTime
public long getCpuTime() -
setName
-
setId
public void setId(int id) -
setStatus
-
setLogFile
-
setStatsFile
-
setWallClockTime
public void setWallClockTime(long elapsedTime) -
setCpuTime
public void setCpuTime(long cpuTime) -
getJobLog
Retrieves the Job log file content- Returns:
- textual content of the Job Log file
-
getStatisticsLog
Retrieves the statistics log file content- Returns:
- textual content of te stats log file
-
addGeneration
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
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
-