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 IJobStatuspublic JobState getState()
getState in interface IJobStatuspublic boolean isStopped()
isStopped in interface IJobStatuspublic boolean isStopping()
isStopping in interface IJobStatuspublic boolean isStopRequested()
public void setStopRequested(boolean stopRequested)
public boolean isResumed()
isResumed in interface IJobStatustrue if the current job was resumedpublic boolean isStarted()
isStarted in interface IJobStatustrue if job was startedpublic boolean isPrematurlyEnded()
isPrematurlyEnded in interface IJobStatustrue if job finishedpublic boolean isCompleted()
isCompleted in interface IJobStatustrue if the job execution is completepublic boolean isAborted()
isAborted in interface IJobStatustrue if job was startedpublic boolean isRunning()
isRunning in interface IJobStatustrue if still runningpublic boolean isState(JobState... states)
isState in interface IJobStatusstates - one or more states to matchtrue if progress status matches supplied statusespublic double getProgress()
getProgress in interface IJobStatuspublic String getNote()
getNote in interface IJobStatuspublic JobDuration getDuration()
getDuration in interface IJobStatuspublic com.norconex.commons.lang.map.Properties getProperties()
getProperties in interface IJobStatuspublic void setProgress(double progress)
public void setNote(String note)
public void setDuration(JobDuration duration)
public Date getLastActivity()
getLastActivity in interface IJobStatuspublic void setLastActivity(Date lastActivity)
lastActivity - last activitypublic int getResumeAttempts()
getResumeAttempts in interface IJobStatuspublic void setResumeAttempts(int resumeAttempts)
public void incrementResumeAttempts()
Copyright © 2007–2021 Norconex Inc.. All rights reserved.