Interface JobDetail
-
- All Superinterfaces:
java.lang.Cloneable,java.io.Serializable
- All Known Implementing Classes:
JobDetailImpl
public interface JobDetail extends java.io.Serializable, java.lang.CloneableConveys the detail properties of a givenJobinstance. JobDetails are to be created/defined withJobBuilder.Quartz does not store an actual instance of a
Jobclass, but instead allows you to define an instance of one, through the use of aJobDetail.Jobs have a name and group associated with them, which should uniquely identify them within a single.SchedulerTriggers are the 'mechanism' by whichJobs are scheduled. ManyTriggers can point to the sameJob, but a singleTriggercan only point to oneJob.- Author:
- James House
- See Also:
JobBuilder,Job,JobDataMap,Trigger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectclone()java.lang.StringgetDescription()Return the description given to theJobinstance by its creator (if any).JobBuildergetJobBuilder()Get aJobBuilderthat is configured to produce aJobDetailidentical to this one.java.lang.Class<? extends Job>getJobClass()Get the instance ofJobthat will be executed.JobDataMapgetJobDataMap()Get theJobDataMapthat is associated with theJob.JobKeygetKey()booleanisConcurrentExecutionDisallowed()booleanisDurable()Whether or not theJobshould remain stored after it is orphaned (nopoint to it).TriggersbooleanisPersistJobDataAfterExecution()booleanrequestsRecovery()Instructs theSchedulerwhether or not theJobshould be re-executed if a 'recovery' or 'fail-over' situation is encountered.
-
-
-
Method Detail
-
getKey
JobKey getKey()
-
getDescription
java.lang.String getDescription()
Return the description given to the
Jobinstance by its creator (if any).- Returns:
- null if no description was set.
-
getJobClass
java.lang.Class<? extends Job> getJobClass()
Get the instance of
Jobthat will be executed.
-
getJobDataMap
JobDataMap getJobDataMap()
Get the
JobDataMapthat is associated with theJob.
-
isDurable
boolean isDurable()
Whether or not the
Jobshould remain stored after it is orphaned (nopoint to it).TriggersIf not explicitly set, the default value is
false.- Returns:
trueif the Job should remain persisted after being orphaned.
-
isPersistJobDataAfterExecution
boolean isPersistJobDataAfterExecution()
- Returns:
- whether the associated Job class carries the
PersistJobDataAfterExecutionannotation. - See Also:
PersistJobDataAfterExecution
-
isConcurrentExecutionDisallowed
boolean isConcurrentExecutionDisallowed()
- Returns:
- whether the associated Job class carries the
DisallowConcurrentExecutionannotation. - See Also:
DisallowConcurrentExecution
-
requestsRecovery
boolean requestsRecovery()
Instructs the
Schedulerwhether or not theJobshould be re-executed if a 'recovery' or 'fail-over' situation is encountered.If not explicitly set, the default value is
false.- See Also:
JobExecutionContext.isRecovering()
-
clone
java.lang.Object clone()
-
getJobBuilder
JobBuilder getJobBuilder()
Get aJobBuilderthat is configured to produce aJobDetailidentical to this one.
-
-