|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.scheduler.core.status.AbstractJobDetailsFactory<T>
T - The type that the scheduler implementation uses as its internal representation
of a job.public abstract class AbstractJobDetailsFactory<T>
Converts a scheduler implementation's internal representation of a job into a
JobDetails. This class produces LazyJobDetails instances when
the JobRunner is registered as opposed to deserializing the parameters
immediately.
| Constructor Summary | |
|---|---|
protected |
AbstractJobDetailsFactory(AbstractSchedulerService schedulerService)
|
| Method Summary | |
|---|---|
JobDetails |
buildJobDetails(JobId jobId,
T jobData,
RunMode runMode)
Transforms the scheduler's internal representation of a job into a JobDetails. |
protected abstract JobRunnerKey |
getJobRunnerKey(T jobData)
Provided by the scheduler implementation to extract the job's JobRunnerKey from
the scheduler's internal representation of the job. |
protected abstract Date |
getNextRunTime(T jobData)
Provided by the scheduler implementation to extract the job's next scheduled run time from the scheduler's internal representation of the job. |
protected abstract Schedule |
getSchedule(T jobData)
Provided by the scheduler implementation to extract the job's Schedule from
the scheduler's internal representation of the job. |
protected abstract byte[] |
getSerializedParameters(T jobData)
Provided by the scheduler implementation to extract the job's parameters map (in serialized form) from the scheduler's internal representation of the job. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractJobDetailsFactory(AbstractSchedulerService schedulerService)
| Method Detail |
|---|
public JobDetails buildJobDetails(@Nonnull
JobId jobId,
@Nonnull
T jobData,
@Nonnull
RunMode runMode)
JobDetails.
This will attempt to reconstruct the job's parameters using the ClassLoader of the
job's JobRunner and return an UnusableJobDetails if the job runner
is not registered or its class loader cannot deserialize the parameters map.
jobId - the job's IDjobData - the internal representation of the jobrunMode - the expected run mode of the job
@Nonnull
protected abstract JobRunnerKey getJobRunnerKey(@Nonnull
T jobData)
JobRunnerKey from
the scheduler's internal representation of the job.
jobData - the scheduler's internal representation of the job
@Nonnull
protected abstract Schedule getSchedule(@Nonnull
T jobData)
Schedule from
the scheduler's internal representation of the job.
jobData - the scheduler's internal representation of the job
Schedule
@Nullable
protected abstract Date getNextRunTime(@Nonnull
T jobData)
jobData - the scheduler's internal representation of the job
null if the job will not be run again or
if the scheduler does not provide information about future run times
@Nullable
protected abstract byte[] getSerializedParameters(@Nonnull
T jobData)
jobData - the scheduler's internal representation of the job
null,
in which case an empty map will be substituted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||