com.norconex.jef.progress
Interface IJobStatus

All Superinterfaces:
Serializable
All Known Subinterfaces:
IProgressSnapshot
All Known Implementing Classes:
JobProgress

public interface IJobStatus
extends Serializable

Representation of a job execution status at any given time.

Since:
2.0
Author:
Pascal Essiembre

Nested Class Summary
static class IJobStatus.Status
          A job execution status.
 
Method Summary
 double getCompletionRatio()
          Gets the job completion ration.
 long getElapsedTime()
          Gets how long it took to finish a job, in milliseconds.
 Date getEndTime()
          Gets the end date of this progress.
 IJobContext getJobContext()
          Contextual information about the job this status represents.
 String getJobId()
          The ID of the job this status represents.
 Date getLastActivity()
          Gets the date on which last activity on the job execution occured.
 String getMetadata()
          Gets meta-data associated with this job progress.
 String getNote()
          Gets the current progress note.
 long getProgress()
          Gets the current progress.
 Date getStartTime()
          Gets the end start of this progress.
 IJobStatus.Status getStatus()
          Gets the current job status.
 boolean isRecovery()
          Whether this progress is from a recovery attempt from a previously failed job.
 boolean isStopRequested()
          Whether a request stop this job was received.
 

Method Detail

getJobId

String getJobId()
The ID of the job this status represents.

Returns:
job id

getJobContext

IJobContext getJobContext()
Contextual information about the job this status represents.

Returns:
job context information

getNote

String getNote()
Gets the current progress note.

Returns:
Returns the note.

getProgress

long getProgress()
Gets the current progress.

Returns:
Returns the progress.

getEndTime

Date getEndTime()
Gets the end date of this progress. null if the progress never finished.

Returns:
end time

getLastActivity

Date getLastActivity()
Gets the date on which last activity on the job execution occured.

Returns:
last activity date

getMetadata

String getMetadata()
Gets meta-data associated with this job progress.

Returns:
meta-data

getStartTime

Date getStartTime()
Gets the end start of this progress. null if the progress never started.

Returns:
start time

isStopRequested

boolean isStopRequested()
Whether a request stop this job was received.

Returns:
true if a stop request was received.

getElapsedTime

long getElapsedTime()
Gets how long it took to finish a job, in milliseconds.

Returns:
job execution elapsed time

getCompletionRatio

double getCompletionRatio()
Gets the job completion ration.

Returns:
a double between 0 and 1

getStatus

IJobStatus.Status getStatus()

Gets the current job status.

Returns:
job status

isRecovery

boolean isRecovery()
Whether this progress is from a recovery attempt from a previously failed job.

Returns:
true if the current progress is a recovery


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