org.jmonks.batch.framework
Class JobStatistics

java.lang.Object
  extended byorg.jmonks.batch.framework.JobStatistics

public class JobStatistics
extends java.lang.Object

JobStatistics holds the useful metrics and information of particular run of a job. These statistics helpful in research of the periodic growth of the jobs. Statistics it holds are start and end time of the run, records have been processed in the run, memory has been utilized in the run and exit code of that run.

Since:
1.0
Version:
1.0
Author:
Suresh Pragada

Constructor Summary
JobStatistics(java.lang.String jobName)
          Constructor takes the job name and build the skelton.
 
Method Summary
 java.util.Date getEndTime()
          Gets the ending time of this job.
 ErrorCode getExitCode()
          Gets the exit code.
 java.lang.String getJobname()
          Gets the job name
 long getMaxMemoryUsage()
          Gets the maximum memory used by this job in bytes.
 long getRecordsProcessed()
          Gets the number of records processed.
 java.util.Date getStartTime()
          Gets the start time of this job.
 void setEndTime(java.util.Date endTime)
          Sets the endtime of the job.
 void setExitCode(ErrorCode exitCode)
          Sets the given error code as exit code.
 void setMaxMemeoryUsage(long memoryUsage)
          Sets the maximum memory used for the job in bytes.
 void setRecordsProcessed(long recordCount)
          Sets the number of the records processed in this job.
 void setStartTime(java.util.Date startTime)
          Sets the startime of the job.
 java.lang.String toString()
           Returns the string representation of JobStatistics class in the format
{JobStatistics [jobName = value] [startTime = value] [endTime = value]}
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobStatistics

public JobStatistics(java.lang.String jobName)
Constructor takes the job name and build the skelton.

Method Detail

setStartTime

public void setStartTime(java.util.Date startTime)
Sets the startime of the job.

Parameters:
startTime - Starting time of the job.

setEndTime

public void setEndTime(java.util.Date endTime)
Sets the endtime of the job.

Parameters:
endTime - Ending time of the job.

setRecordsProcessed

public void setRecordsProcessed(long recordCount)
Sets the number of the records processed in this job.

Parameters:
recordCount - Sets the number of records got processed.

setMaxMemeoryUsage

public void setMaxMemeoryUsage(long memoryUsage)
Sets the maximum memory used for the job in bytes.


getStartTime

public java.util.Date getStartTime()
Gets the start time of this job.

Returns:
Returns the starting time of this job.

getEndTime

public java.util.Date getEndTime()
Gets the ending time of this job.

Returns:
Gets the end time of this job.

getRecordsProcessed

public long getRecordsProcessed()
Gets the number of records processed.

Returns:
Returns the number of records got processed.

getMaxMemoryUsage

public long getMaxMemoryUsage()
Gets the maximum memory used by this job in bytes.

Returns:
Returns the max memory used by this job.

getJobname

public java.lang.String getJobname()
Gets the job name

Returns:
Returns the name of this job.

setExitCode

public void setExitCode(ErrorCode exitCode)
Sets the given error code as exit code.

Parameters:
exitCode - Error code controller is going to return to the framework.

getExitCode

public ErrorCode getExitCode()
Gets the exit code.


toString

public java.lang.String toString()

Returns the string representation of JobStatistics class in the format
{JobStatistics [jobName = value] [startTime = value] [endTime = value]}

Returns:
Returns the string representation of JobStatistics.