|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.quartz.impl.JobDetailImpl
public class JobDetailImpl
Conveys the detail properties of a given Job
instance.
Quartz does not store an actual instance of a Job
class, but
instead allows you to define an instance of one, through the use of a JobDetail
.
Job
s have a name and group associated with them, which
should uniquely identify them within a single
.
Scheduler
Trigger
s are the 'mechanism' by which Job
s
are scheduled. Many Trigger
s can point to the same Job
,
but a single Trigger
can only point to one Job
.
Job
,
StatefulJob
,
JobDataMap
,
Trigger
,
Serialized FormConstructor Summary | |
---|---|
JobDetailImpl()
Create a JobDetail with no specified name or group, and
the default settings of all the other properties. |
|
JobDetailImpl(String name,
Class<? extends Job> jobClass)
Deprecated. use JobBuilder |
|
JobDetailImpl(String name,
String group,
Class<? extends Job> jobClass)
Deprecated. use JobBuilder |
|
JobDetailImpl(String name,
String group,
Class<? extends Job> jobClass,
boolean durability,
boolean recover)
Deprecated. use JobBuilder |
Method Summary | |
---|---|
Object |
clone()
|
boolean |
equals(Object obj)
|
String |
getDescription()
Return the description given to the Job instance by its
creator (if any). |
String |
getFullName()
Returns the 'full name' of the JobDetail in the format
"group.name". |
String |
getGroup()
Get the group of this Job . |
JobBuilder |
getJobBuilder()
Get a JobBuilder that is configured to produce a
JobDetail identical to this one. |
Class<? extends Job> |
getJobClass()
Get the instance of Job that will be executed. |
JobDataMap |
getJobDataMap()
Get the JobDataMap that is associated with the Job . |
JobKey |
getKey()
|
String |
getName()
Get the name of this Job . |
int |
hashCode()
|
boolean |
isConcurrentExectionDisallowed()
|
boolean |
isDurable()
Whether or not the Job should remain stored after it is
orphaned (no point to it). |
boolean |
isPersistJobDataAfterExecution()
|
boolean |
requestsRecovery()
Instructs the Scheduler whether or not the Job
should be re-executed if a 'recovery' or 'fail-over' situation is
encountered. |
void |
setDescription(String description)
Set a description for the Job instance - may be useful
for remembering/displaying the purpose of the job, though the
description has no meaning to Quartz. |
void |
setDurability(boolean durability)
Set whether or not the Job should remain stored after it
is orphaned (no point to it). |
void |
setGroup(String group)
Set the group of this Job . |
void |
setJobClass(Class<? extends Job> jobClass)
Set the instance of Job that will be executed. |
void |
setJobDataMap(JobDataMap jobDataMap)
Set the JobDataMap to be associated with the Job . |
void |
setKey(JobKey key)
|
void |
setName(String name)
Set the name of this Job . |
void |
setRequestsRecovery(boolean shouldRecover)
Set whether or not the the Scheduler should re-execute
the Job if a 'recovery' or 'fail-over' situation is
encountered. |
String |
toString()
Return a simple string representation of this object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JobDetailImpl()
Create a JobDetail
with no specified name or group, and
the default settings of all the other properties.
Note that the setName(String)
,setGroup(String)
and
setJobClass(Class)
methods must be called before the job can be
placed into a Scheduler
public JobDetailImpl(String name, Class<? extends Job> jobClass)
JobBuilder
Create a JobDetail
with the given name, given class, default group,
and the default settings of all the other properties.
IllegalArgumentException
- if name is null or empty, or the group is an empty string.public JobDetailImpl(String name, String group, Class<? extends Job> jobClass)
JobBuilder
Create a JobDetail
with the given name, group and class,
and the default settings of all the other properties.
group
- if null
, Scheduler.DEFAULT_GROUP will be used.
IllegalArgumentException
- if name is null or empty, or the group is an empty string.public JobDetailImpl(String name, String group, Class<? extends Job> jobClass, boolean durability, boolean recover)
JobBuilder
Create a JobDetail
with the given name, and group, and
the given settings of all the other properties.
group
- if null
, Scheduler.DEFAULT_GROUP will be used.
IllegalArgumentException
- if name is null or empty, or the group is an empty string.Method Detail |
---|
public String getName()
Get the name of this Job
.
public void setName(String name)
Set the name of this Job
.
IllegalArgumentException
- if name is null or empty.public String getGroup()
Get the group of this Job
.
public void setGroup(String group)
Set the group of this Job
.
group
- if null
, Scheduler.DEFAULT_GROUP will be used.
IllegalArgumentException
- if the group is an empty string.public String getFullName()
Returns the 'full name' of the JobDetail
in the format
"group.name".
public JobKey getKey()
getKey
in interface JobDetail
public void setKey(JobKey key)
public String getDescription()
JobDetail
Return the description given to the Job
instance by its
creator (if any).
getDescription
in interface JobDetail
public void setDescription(String description)
Set a description for the Job
instance - may be useful
for remembering/displaying the purpose of the job, though the
description has no meaning to Quartz.
public Class<? extends Job> getJobClass()
JobDetail
Get the instance of Job
that will be executed.
getJobClass
in interface JobDetail
public void setJobClass(Class<? extends Job> jobClass)
Set the instance of Job
that will be executed.
IllegalArgumentException
- if jobClass is null or the class is not a Job
.public JobDataMap getJobDataMap()
JobDetail
Get the JobDataMap
that is associated with the Job
.
getJobDataMap
in interface JobDetail
public void setJobDataMap(JobDataMap jobDataMap)
Set the JobDataMap
to be associated with the Job
.
public void setDurability(boolean durability)
Set whether or not the Job
should remain stored after it
is orphaned (no
point to it).
Trigger
s
If not explicitly set, the default value is false
.
public void setRequestsRecovery(boolean shouldRecover)
Set whether or not the the Scheduler
should re-execute
the Job
if a 'recovery' or 'fail-over' situation is
encountered.
If not explicitly set, the default value is false
.
JobExecutionContext.isRecovering()
public boolean isDurable()
JobDetail
Whether or not the Job
should remain stored after it is
orphaned (no
point to it).
Trigger
s
If not explicitly set, the default value is false
.
isDurable
in interface JobDetail
true
if the Job should remain persisted after
being orphaned.public boolean isPersistJobDataAfterExecution()
isPersistJobDataAfterExecution
in interface JobDetail
PersistJobDataAfterExecution
annotation.PersistJobDataAfterExecution
public boolean isConcurrentExectionDisallowed()
isConcurrentExectionDisallowed
in interface JobDetail
DisallowConcurrentExecution
annotation.DisallowConcurrentExecution
public boolean requestsRecovery()
JobDetail
Instructs the Scheduler
whether or not the Job
should be re-executed if a 'recovery' or 'fail-over' situation is
encountered.
If not explicitly set, the default value is false
.
requestsRecovery
in interface JobDetail
JobExecutionContext.isRecovering()
public String toString()
Return a simple string representation of this object.
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Object clone()
clone
in interface JobDetail
clone
in class Object
public JobBuilder getJobBuilder()
JobDetail
JobBuilder
that is configured to produce a
JobDetail
identical to this one.
getJobBuilder
in interface JobDetail
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |