Directly Access Job Properties

As you've already seen, jobs allow you to retrieve information on their state at any time — even when they're not running.

Here's the list of data each job directly exposes via its getter methods.

Method Description
getId() The unique (sequential) ID of this job (within this JVM/classloader).
getUuid() The universally unique identifier (UUID) for this job.
getName() The name assigned to this job or its default name if one was not assigned.
getCreatedOn() The time this job instance was created.
getStartedOn() The time this job instance started running
getCancelledOn() The time this job instance was cancelled.
isCancelled() Indicates if this job was cancelled
getPausedOn() The time this job was paused or null if this job is not currently paused
isPaused() Indicates if this job is currently paused
getFinishedOn() The time this job finished running
isFinished() Indicates if this job has finished running
getException() The last exception thrown while running
isFailed() Indicates if this job has completed unsuccessfully.
getRunThread() The thread currently executing this job or null if the job is not running.
isRunning() Indicates if this job is currently running
getRunningTime() Time in milliseconds this job was (or has been) running for or zero (0) if it hasn't yet started running.
getRunningTimeAsString() The time this job was (or has been) running for as a human readable string or null if it hasn't yet started running.
getRecordsTransferred() The number of records sent from the supplied reader to the supplied writer.
getLastRecord() The most recent record seen by this job while it is running or null.
getReader() The reader supplied to this job.
getWriter() The writer supplied to this job.
getReaders() The read pipeline — the chain of readers records pass through, starting with the root instance and ending with the reader supplied to this job.
getWriters() The write pipeline — the chain of writers records pass through, starting with the writer supplied to this job and ending with the root instance.
Mobile Analytics