public class MutableJobStatus extends Object implements IJobStatus
Constructor and Description |
---|
MutableJobStatus(String jobId) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
JobDuration |
getDuration() |
String |
getJobId() |
Date |
getLastActivity()
Gets the last activity.
|
String |
getNote() |
double |
getProgress() |
com.norconex.commons.lang.map.Properties |
getProperties() |
int |
getResumeAttempts() |
JobState |
getState()
Gets the job execution state.
|
int |
hashCode() |
void |
incrementResumeAttempts() |
boolean |
isAborted()
Checks whether the job was aborted or not (i.e.
|
boolean |
isCompleted()
Checks whether the job execution has completed.
|
boolean |
isPrematurlyEnded()
Checks whether the job ended before its time.
|
boolean |
isResumed()
Whether this status resumed from a previously
failed or stopped job.
|
boolean |
isRunning()
Checks whether the job execution represented by this progress is still
running.
|
boolean |
isStarted()
Checks whether the job was started or not.
|
boolean |
isState(JobState... states)
Checks whether the current progress status matches any of the supplied
statuses.
|
boolean |
isStopped() |
boolean |
isStopping() |
boolean |
isStopRequested() |
void |
setDuration(JobDuration duration) |
void |
setLastActivity(Date lastActivity)
Sets the last activity.
|
void |
setNote(String note) |
void |
setProgress(double progress) |
void |
setResumeAttempts(int resumeAttempts) |
void |
setStopRequested(boolean stopRequested) |
String |
toString() |
public MutableJobStatus(String jobId)
public String getJobId()
getJobId
in interface IJobStatus
public JobState getState()
getState
in interface IJobStatus
public boolean isStopped()
isStopped
in interface IJobStatus
public boolean isStopping()
isStopping
in interface IJobStatus
public boolean isStopRequested()
public void setStopRequested(boolean stopRequested)
public boolean isResumed()
isResumed
in interface IJobStatus
true
if the current job was resumedpublic boolean isStarted()
isStarted
in interface IJobStatus
true
if job was startedpublic boolean isPrematurlyEnded()
isPrematurlyEnded
in interface IJobStatus
true
if job finishedpublic boolean isCompleted()
isCompleted
in interface IJobStatus
true
if the job execution is completepublic boolean isAborted()
isAborted
in interface IJobStatus
true
if job was startedpublic boolean isRunning()
isRunning
in interface IJobStatus
true
if still runningpublic boolean isState(JobState... states)
isState
in interface IJobStatus
states
- one or more states to matchtrue
if progress status matches supplied statusespublic double getProgress()
getProgress
in interface IJobStatus
public String getNote()
getNote
in interface IJobStatus
public JobDuration getDuration()
getDuration
in interface IJobStatus
public com.norconex.commons.lang.map.Properties getProperties()
getProperties
in interface IJobStatus
public void setProgress(double progress)
public void setNote(String note)
public void setDuration(JobDuration duration)
public Date getLastActivity()
getLastActivity
in interface IJobStatus
public void setLastActivity(Date lastActivity)
lastActivity
- last activitypublic int getResumeAttempts()
getResumeAttempts
in interface IJobStatus
public void setResumeAttempts(int resumeAttempts)
public void incrementResumeAttempts()
Copyright © 2007–2021 Norconex Inc.. All rights reserved.