Snapshot of a tracked job's progress and outcome, shared between the async processing framework and JS job functions via TrackedProcessable.getStatusInfo(). Records whether the job is complete or cancelled, the dates those events happened, and any custom state data the job has published.
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| cancelled | boolean | Whether the job has been cancelled. |
| cancelledDate | Date | The date and time the job was cancelled. |
| complete | boolean | Whether the job has been marked as complete by the async processing framework. |
| completedDate | Date | The date and time the job was marked complete. |
| createdDate | Date | The date and time the job was created. Defaults to the time this status info was constructed. |
| stateData | String | Custom job state data, as a string, that the job has published for display or for JS job functions to read. |
Methods
isComplete() · setComplete(boolean b) · setCancelled(boolean b) · isCancelled() · getCompletedDate() · setCreatedDate(Date createdDate) · getCreatedDate() · getCancelledDate() · getStateData() · setStateData(String stateData) · job()
isComplete()
Returns: boolean
Whether the job has been marked as complete by the async processing framework.
setComplete(boolean b)
Returns: void
Marks the job as complete or not, and records the current time as the completed date. Called by the async processor when the job finishes.
| Parameter | Description |
|---|---|
b | true to mark the job complete, false to clear the complete flag |
setCancelled(boolean b)
Returns: void
Marks the job as cancelled or not, and records the current time as the cancelled date.
| Parameter | Description |
|---|---|
b | true to mark the job cancelled, false to clear the cancelled flag |
isCancelled()
Returns: boolean
Whether the job has been cancelled.
getCompletedDate()
Returns: Date
The date and time the job was marked complete.
setCreatedDate(Date createdDate)
Returns: void
Sets the date and time the job was created.
| Parameter | Description |
|---|---|
createdDate | the created date to record |
getCreatedDate()
Returns: Date
The date and time the job was created. Defaults to the time this status info was constructed.
getCancelledDate()
Returns: Date
The date and time the job was cancelled.
getStateData()
Returns: String
Custom job state data, as a string, that the job has published for display or for JS job functions to read.
setStateData(String stateData)
Returns: void
Sets custom state data for the job, for display or for JS job functions to read back later.
| Parameter | Description |
|---|---|
stateData | the state data to record |
job()
Returns: AsyncJob
The underlying async job this status info was built from.