|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.quartz.locality.DelegatingLocalityTrigger
public class DelegatingLocalityTrigger
Wrapping a Trigger instance while adding the LocalityAware contract All Trigger
method calls will be delegated to the wrapped Trigger instance
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.quartz.Trigger |
|---|
Trigger.CompletedExecutionInstruction, Trigger.TriggerState, Trigger.TriggerTimeComparator |
| Field Summary |
|---|
| Fields inherited from interface org.quartz.Trigger |
|---|
DEFAULT_PRIORITY, MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY, MISFIRE_INSTRUCTION_SMART_POLICY, serialVersionUID |
| Constructor Summary | |
|---|---|
DelegatingLocalityTrigger(Trigger trigger,
NodeSpec nodeSpec)
Constructs a LocalityAware Trigger, wrapping an existing Trigger instance, with additional NodeSpec |
|
| Method Summary | |
|---|---|
Object |
clone()
|
int |
compareTo(Trigger other)
Compare the next fire time of this Trigger to that of
another by comparing their keys, or in other words, sorts them
according to the natural (i.e. |
Date |
computeFirstFireTime(Calendar calendar)
|
Trigger.CompletedExecutionInstruction |
executionComplete(JobExecutionContext context,
JobExecutionException result)
|
String |
getCalendarName()
Get the name of the associated with this
Trigger. |
String |
getDescription()
Return the description given to the Trigger instance by
its creator (if any). |
Date |
getEndTime()
Get the time at which the Trigger should quit repeating -
regardless of any remaining repeats (based on the trigger's particular
repeat settings). |
Date |
getFinalFireTime()
Returns the last time at which the Trigger will fire, if
the Trigger will repeat indefinitely, null will be returned. |
String |
getFireInstanceId()
|
Date |
getFireTimeAfter(Date afterTime)
Returns the next time at which the Trigger will fire,
after the given time. |
JobDataMap |
getJobDataMap()
Get the JobDataMap that is associated with the
Trigger. |
JobKey |
getJobKey()
|
TriggerKey |
getKey()
|
int |
getMisfireInstruction()
Get the instruction the Scheduler should be given for
handling misfire situations for this Trigger- the
concrete Trigger type that you are using will have
defined a set of additional MISFIRE_INSTRUCTION_XXX
constants that may be set as this property's value. |
Date |
getNextFireTime()
Returns the next time at which the Trigger is scheduled to fire. |
NodeSpec |
getNodeSpec()
Accessor to the NodeSpec instance to evaluate constraints |
Date |
getPreviousFireTime()
Returns the previous time at which the Trigger fired. |
int |
getPriority()
The priority of a Trigger acts as a tiebreaker such that if
two Triggers have the same scheduled fire time, then the
one with the higher priority will get first access to a worker
thread. |
ScheduleBuilder<Trigger> |
getScheduleBuilder()
Get a ScheduleBuilder that is configured to produce a
schedule identical to this trigger's schedule. |
Date |
getStartTime()
Get the time at which the Trigger should occur. |
TriggerBuilder<Trigger> |
getTriggerBuilder()
Get a TriggerBuilder that is configured to produce a
Trigger identical to this one. |
boolean |
mayFireAgain()
Used by the to determine whether or not
it is possible for this Trigger to fire again. |
void |
setCalendarName(String calendarName)
|
void |
setDescription(String description)
|
void |
setEndTime(Date endTime)
|
void |
setFireInstanceId(String id)
|
void |
setJobDataMap(JobDataMap jobDataMap)
|
void |
setJobKey(JobKey key)
|
void |
setKey(TriggerKey key)
|
void |
setMisfireInstruction(int misfireInstruction)
|
void |
setNextFireTime(Date nextFireTime)
|
void |
setPreviousFireTime(Date previousFireTime)
|
void |
setPriority(int priority)
|
void |
setStartTime(Date startTime)
|
void |
triggered(Calendar calendar)
|
void |
updateAfterMisfire(Calendar cal)
|
void |
updateWithNewCalendar(Calendar cal,
long misfireThreshold)
|
void |
validate()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.quartz.Trigger |
|---|
equals |
| Constructor Detail |
|---|
public DelegatingLocalityTrigger(Trigger trigger,
NodeSpec nodeSpec)
LocalityAware Trigger, wrapping an existing Trigger instance, with additional NodeSpec
trigger - The Trigger instance to wrapnodeSpec - The NodeSpec instance| Method Detail |
|---|
public NodeSpec getNodeSpec()
NodeSpec instance to evaluate constraints
getNodeSpec in interface LocalityAwarepublic TriggerKey getKey()
getKey in interface Triggerpublic JobKey getJobKey()
getJobKey in interface Triggerpublic String getDescription()
Trigger instance by
its creator (if any).
getDescription in interface Triggerpublic String getCalendarName()
Calendar associated with this
Trigger.
getCalendarName in interface Triggernull if there is no associated Calendar.public JobDataMap getJobDataMap()
JobDataMap that is associated with the
Trigger.
Changes made to this map during job execution are not re-persisted, and
in fact typically result in an IllegalStateException.
getJobDataMap in interface Triggerpublic int getPriority()
Trigger acts as a tiebreaker such that if
two Triggers have the same scheduled fire time, then the
one with the higher priority will get first access to a worker
thread.
If not explicitly set, the default value is 5.
getPriority in interface TriggerTrigger.DEFAULT_PRIORITYpublic boolean mayFireAgain()
Scheduler to determine whether or not
it is possible for this Trigger to fire again.
If the returned value is false then the Scheduler
may remove the Trigger from the .
JobStore
mayFireAgain in interface Triggerpublic Date getStartTime()
Trigger should occur.
getStartTime in interface Triggerpublic Date getEndTime()
Trigger should quit repeating -
regardless of any remaining repeats (based on the trigger's particular
repeat settings).
getEndTime in interface TriggerTrigger.getFinalFireTime()public Date getNextFireTime()
Trigger is scheduled to fire. If
the trigger will not fire again, null will be returned. Note that
the time returned can possibly be in the past, if the time that was computed
for the trigger to next fire has already arrived, but the scheduler has not yet
been able to fire the trigger (which would likely be due to lack of resources
e.g. threads).
The value returned is not guaranteed to be valid until after the Trigger
has been added to the scheduler.
getNextFireTime in interface TriggerTriggerUtils#computeFireTimesBetween(Trigger, Calendar, Date, Date)public Date getPreviousFireTime()
Trigger fired.
If the trigger has not yet fired, null will be returned.
getPreviousFireTime in interface Triggerpublic Date getFireTimeAfter(Date afterTime)
Trigger will fire,
after the given time. If the trigger will not fire after the given time,
null will be returned.
getFireTimeAfter in interface Triggerpublic Date getFinalFireTime()
Trigger will fire, if
the Trigger will repeat indefinitely, null will be returned.
Note that the return time *may* be in the past.
getFinalFireTime in interface Triggerpublic int getMisfireInstruction()
Scheduler should be given for
handling misfire situations for this Trigger- the
concrete Trigger type that you are using will have
defined a set of additional MISFIRE_INSTRUCTION_XXX
constants that may be set as this property's value.
If not explicitly set, the default value is MISFIRE_INSTRUCTION_SMART_POLICY.
getMisfireInstruction in interface TriggerTrigger.MISFIRE_INSTRUCTION_SMART_POLICY,
#updateAfterMisfire(Calendar),
SimpleTrigger,
CronTriggerpublic int compareTo(Trigger other)
Compare the next fire time of this Trigger to that of
another by comparing their keys, or in other words, sorts them
according to the natural (i.e. alphabetical) order of their keys.
compareTo in interface Comparable<Trigger>compareTo in interface Triggerpublic TriggerBuilder<Trigger> getTriggerBuilder()
TriggerBuilder that is configured to produce a
Trigger identical to this one.
getTriggerBuilder in interface TriggerTrigger.getScheduleBuilder()public ScheduleBuilder<Trigger> getScheduleBuilder()
ScheduleBuilder that is configured to produce a
schedule identical to this trigger's schedule.
getScheduleBuilder in interface TriggerTrigger.getTriggerBuilder()public void setKey(TriggerKey key)
setKey in interface org.quartz.spi.MutableTriggerpublic void setJobKey(JobKey key)
setJobKey in interface org.quartz.spi.MutableTriggerpublic void setDescription(String description)
setDescription in interface org.quartz.spi.MutableTriggerpublic void setCalendarName(String calendarName)
setCalendarName in interface org.quartz.spi.MutableTriggerpublic void setJobDataMap(JobDataMap jobDataMap)
setJobDataMap in interface org.quartz.spi.MutableTriggerpublic void setPriority(int priority)
setPriority in interface org.quartz.spi.MutableTriggerpublic void setStartTime(Date startTime)
setStartTime in interface org.quartz.spi.MutableTriggerpublic void setEndTime(Date endTime)
setEndTime in interface org.quartz.spi.MutableTriggerpublic void setMisfireInstruction(int misfireInstruction)
setMisfireInstruction in interface org.quartz.spi.MutableTriggerpublic void triggered(Calendar calendar)
triggered in interface org.quartz.spi.OperableTriggerpublic Date computeFirstFireTime(Calendar calendar)
computeFirstFireTime in interface org.quartz.spi.OperableTrigger
public Trigger.CompletedExecutionInstruction executionComplete(JobExecutionContext context,
JobExecutionException result)
executionComplete in interface org.quartz.spi.OperableTriggerpublic void updateAfterMisfire(Calendar cal)
updateAfterMisfire in interface org.quartz.spi.OperableTrigger
public void updateWithNewCalendar(Calendar cal,
long misfireThreshold)
updateWithNewCalendar in interface org.quartz.spi.OperableTrigger
public void validate()
throws SchedulerException
validate in interface org.quartz.spi.OperableTriggerSchedulerExceptionpublic void setFireInstanceId(String id)
setFireInstanceId in interface org.quartz.spi.OperableTriggerpublic String getFireInstanceId()
getFireInstanceId in interface org.quartz.spi.OperableTriggerpublic void setNextFireTime(Date nextFireTime)
setNextFireTime in interface org.quartz.spi.OperableTriggerpublic void setPreviousFireTime(Date previousFireTime)
setPreviousFireTime in interface org.quartz.spi.OperableTriggerpublic Object clone()
clone in interface org.quartz.spi.MutableTriggerclone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||