com.norconex.jef.progress
Class JobElapsedTime

java.lang.Object
  extended by com.norconex.jef.progress.JobElapsedTime

public class JobElapsedTime
extends Object

Holds time-related information about a job execution.

Author:
Pascal Essiembre

Constructor Summary
JobElapsedTime()
          Creates a job elapsed time.
JobElapsedTime(Date startTime, Date endTime, Date lastActivity)
          Creates a job elapsed time, initialised.
 
Method Summary
 long getElapsedTime()
          Gets the elapsed time in milliseconds between the execution start and end time.
 String getElapsedTimeAsString()
          Gets the elapsed time as a string, in a human readable format.
 Date getEndTime()
          Gets the end time.
 Date getLastActivity()
          Gets the last activity.
 Date getStartTime()
          Gets the start time.
 void setEndTime(Date endTime)
          Sets the end time.
 void setLastActivity(Date lastActivity)
          Sets the last activity.
 void setStartTime(Date startTime)
          Sets the start time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobElapsedTime

public JobElapsedTime()
Creates a job elapsed time.


JobElapsedTime

public JobElapsedTime(Date startTime,
                      Date endTime,
                      Date lastActivity)
Creates a job elapsed time, initialised.

Since:
1.1.1
Method Detail

getEndTime

public final Date getEndTime()
Gets the end time.

Returns:
end time

setEndTime

public final void setEndTime(Date endTime)
Sets the end time.

Parameters:
endTime -

getStartTime

public final Date getStartTime()
Gets the start time.

Returns:
start time

setStartTime

public final void setStartTime(Date startTime)
Sets the start time.

Parameters:
startTime -

getLastActivity

public final Date getLastActivity()
Gets the last activity.

Returns:
last activity

setLastActivity

public final void setLastActivity(Date lastActivity)
Sets the last activity.

Parameters:
lastActivity - last activity

getElapsedTime

public final long getElapsedTime()
Gets the elapsed time in milliseconds between the execution start and end time.

Returns:
elapsed time

getElapsedTimeAsString

public final String getElapsedTimeAsString()
Gets the elapsed time as a string, in a human readable format.

Returns:
elapsed time


Copyright © 2007-2013 Norconex Inc.. All Rights Reserved.