Package org.jobrunr.jobs
Class Job
java.lang.Object
org.jobrunr.jobs.AbstractJob
org.jobrunr.jobs.Job
- All Implemented Interfaces:
Lockable
Defines the job with its JobDetails, History and Job Metadata
-
Constructor Summary
ConstructorDescriptionJob
(UUID id, int version, JobDetails jobDetails, List<JobState> jobHistory, ConcurrentMap<String, Object> metadata) Job
(UUID id, JobDetails jobDetails) Job
(UUID id, JobDetails jobDetails, JobState jobState) Job
(JobDetails jobDetails) Job
(JobDetails jobDetails, JobState jobState) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
enqueue()
void
getId()
<T extends JobState>
TgetJobState
(int element) getJobStatesOfType
(Class<T> clazz) getLastJobStateOfType
(Class<T> clazz) getState()
boolean
void
scheduleAt
(Instant instant, String reason) void
setRecurringJobId
(String recurringJobId) void
startProcessingOn
(BackgroundJobServer backgroundJobServer) void
toString()
void
Methods inherited from class org.jobrunr.jobs.AbstractJob
getJobDetails, getJobName, getJobSignature, getVersion, lock, setJobName
-
Constructor Details
-
Job
-
Job
-
Job
-
Job
-
Job
public Job(UUID id, int version, JobDetails jobDetails, List<JobState> jobHistory, ConcurrentMap<String, Object> metadata)
-
-
Method Details
-
getId
- Specified by:
getId
in classAbstractJob
-
setRecurringJobId
-
getRecurringJobId
-
getJobStates
-
getJobStatesOfType
-
getLastJobStateOfType
-
getJobState
-
getJobState
-
getState
-
hasState
-
enqueue
public void enqueue() -
scheduleAt
-
startProcessingOn
-
updateProcessing
public void updateProcessing() -
succeeded
public void succeeded() -
failed
-
delete
-
getCreatedAt
-
getUpdatedAt
-
getMetadata
-
toString
-