|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.quartz.impl.jdbcjobstore.JobStoreSupport
org.quartz.impl.jdbcjobstore.JobStoreTX
JobStoreTX is meant to be used in a standalone
environment. Both commit and rollback will be handled by this
class.
If you need a class
to use within an application-server environment, use JobStore instead.JobStoreCMT
| Field Summary |
| Fields inherited from class org.quartz.impl.jdbcjobstore.JobStoreSupport |
calendarCache, delegateClass, dsName, firstCheckIn, instanceId, lastCheckin, LOCK_CALENDAR_ACCESS, LOCK_JOB_ACCESS, LOCK_MISFIRE_ACCESS, LOCK_STATE_ACCESS, LOCK_TRIGGER_ACCESS, tablePrefix |
| Constructor Summary | |
JobStoreTX()
|
|
| Method Summary | |
Trigger |
acquireNextTrigger(SchedulingContext ctxt)
Get a handle to the next trigger to be fired, and mark it as 'reserved' by the calling scheduler. |
protected void |
cleanVolatileTriggerAndJobs()
Removes all volatile data |
protected boolean |
doCheckin()
|
protected boolean |
doRecoverMisfires()
|
java.lang.String[] |
getCalendarNames(SchedulingContext ctxt)
Get the names of all of the s
in the JobStore. |
java.lang.String[] |
getJobGroupNames(SchedulingContext ctxt)
Get the names of all of the
groups. |
java.lang.String[] |
getJobNames(SchedulingContext ctxt,
java.lang.String groupName)
Get the names of all of the s that
have the given group name. |
int |
getNumberOfCalendars(SchedulingContext ctxt)
Get the number of s that are
stored in the JobsStore. |
int |
getNumberOfJobs(SchedulingContext ctxt)
Get the number of s that are stored
in the JobStore. |
int |
getNumberOfTriggers(SchedulingContext ctxt)
Get the number of s that are
stored in the JobsStore. |
java.lang.String[] |
getTriggerGroupNames(SchedulingContext ctxt)
Get the names of all of the
groups. |
java.lang.String[] |
getTriggerNames(SchedulingContext ctxt,
java.lang.String groupName)
Get the names of all of the s
that have the given group name. |
Trigger[] |
getTriggersForJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
Get all of the Triggers that are associated to the given Job. |
int |
getTriggerState(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
Get the current state of the identified . |
void |
pauseAll(SchedulingContext ctxt)
Pause all triggers - equivalent of calling pauseTriggerGroup(group) on every group. |
void |
pauseJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
Pause the with the given name - by pausing
all of its current Triggers. |
void |
pauseJobGroup(SchedulingContext ctxt,
java.lang.String groupName)
Pause all of the in the given group - by
pausing all of their Triggers. |
void |
pauseTrigger(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
Pause the with the given name. |
void |
pauseTriggerGroup(SchedulingContext ctxt,
java.lang.String groupName)
Pause all of the in the given group. |
protected void |
recoverJobs()
Recover any failed or misfired jobs and clean up the data store as appropriate. |
void |
releaseAcquiredTrigger(SchedulingContext ctxt,
Trigger trigger)
Inform the JobStore that the scheduler no longer plans to
fire the given Trigger, that it had previously acquired
(reserved). |
boolean |
removeCalendar(SchedulingContext ctxt,
java.lang.String calName)
Remove (delete) the with the
given name. |
boolean |
removeJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
Remove (delete) the with the given
name, and any s that reference
it. |
boolean |
removeTrigger(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
Remove (delete) the with the
given name. |
void |
resumeAll(SchedulingContext ctxt)
Resume (un-pause) all triggers - equivalent of calling resumeTriggerGroup(group) on every group. |
void |
resumeJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
Resume (un-pause) the with the given
name. |
void |
resumeJobGroup(SchedulingContext ctxt,
java.lang.String groupName)
Resume (un-pause) all of the in the given
group. |
void |
resumeTrigger(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
Resume (un-pause) the with the given
name. |
void |
resumeTriggerGroup(SchedulingContext ctxt,
java.lang.String groupName)
Resume (un-pause) all of the in the given
group. |
Calendar |
retrieveCalendar(SchedulingContext ctxt,
java.lang.String calName)
Retrieve the given . |
JobDetail |
retrieveJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
Retrieve the for the
given . |
Trigger |
retrieveTrigger(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
Retrieve the given . |
void |
storeCalendar(SchedulingContext ctxt,
java.lang.String calName,
Calendar calendar,
boolean replaceExisting)
Store the given . |
void |
storeJob(SchedulingContext ctxt,
JobDetail newJob,
boolean replaceExisting)
Store the given . |
void |
storeJobAndTrigger(SchedulingContext ctxt,
JobDetail newJob,
Trigger newTrigger)
Store the given and
. |
void |
storeTrigger(SchedulingContext ctxt,
Trigger newTrigger,
boolean replaceExisting)
Store the given . |
void |
triggeredJobComplete(SchedulingContext ctxt,
Trigger trigger,
JobDetail jobDetail,
int triggerInstCode)
Inform the JobStore that the scheduler has
completed the firing of the given Trigger (and the
execution its associated Job), and that the
in the given
JobDetail should be updated if the
Job is stateful. |
TriggerFiredBundle |
triggerFired(SchedulingContext ctxt,
Trigger trigger)
Inform the JobStore that the scheduler is now firing the
given Trigger (executing its associated Job),
that it had previously acquired (reserved). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JobStoreTX()
| Method Detail |
protected void recoverJobs()
throws JobPersistenceException
Recover any failed or misfired jobs and clean up the data store as appropriate.
recoverJobs in class JobStoreSupportJobPersistenceException - if jobs could not be recovered
protected void cleanVolatileTriggerAndJobs()
throws JobPersistenceException
JobStoreSupportRemoves all volatile data
cleanVolatileTriggerAndJobs in class JobStoreSupportJobPersistenceException - if jobs could not be recovered
public void storeJobAndTrigger(SchedulingContext ctxt,
JobDetail newJob,
Trigger newTrigger)
throws ObjectAlreadyExistsException,
JobPersistenceException
Store the given and
JobDetail.Trigger
newJob - The JobDetail to be stored.newTrigger - The Trigger to be stored.
ObjectAlreadyExistsException - if a Job with the
same name/group already exists.
JobPersistenceException
public void storeJob(SchedulingContext ctxt,
JobDetail newJob,
boolean replaceExisting)
throws ObjectAlreadyExistsException,
JobPersistenceException
Store the given .JobDetail
newJob - The JobDetail to be stored.replaceExisting - If true, any Job existing
in the JobStore with the same name & group should be
over-written.
ObjectAlreadyExistsException - if a Job with the
same name/group already exists, and replaceExisting is set to false.
JobPersistenceException
public boolean removeJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
throws JobPersistenceException
Remove (delete) the with the given
name, and any Jobs that reference
it.Trigger
If removal of the Job results in an empty group, the
group should be removed from the JobStore's list of known
group names.
jobName - The name of the Job to be removed.groupName - The group name of the Job to be removed.
true if a Job with the given name & group
was found and removed from the store.
JobPersistenceException
public JobDetail retrieveJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
throws JobPersistenceException
Retrieve the for the
given JobDetail.Job
jobName - The name of the Job to be retrieved.groupName - The group name of the Job to be retrieved.
Job, or null if there is no match.
JobPersistenceException
public void storeTrigger(SchedulingContext ctxt,
Trigger newTrigger,
boolean replaceExisting)
throws ObjectAlreadyExistsException,
JobPersistenceException
Store the given .Trigger
newTrigger - The Trigger to be stored.replaceExisting - If true, any Trigger
existing in the JobStore with the same name & group should
be over-written.
ObjectAlreadyExistsException - if a Trigger with the
same name/group already exists, and replaceExisting is set to false.
JobPersistenceExceptionJobStore.pauseTriggerGroup(SchedulingContext, String)
public boolean removeTrigger(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
throws JobPersistenceException
Remove (delete) the with the
given name.Trigger
If removal of the Trigger results in an empty group, the
group should be removed from the JobStore's list of known
group names.
If removal of the Trigger results in an 'orphaned'
Job that is not 'durable', then the Job should
be deleted also.
triggerName - The name of the Trigger to be removed.groupName - The group name of the Trigger to be removed.
true if a Trigger with the given name &
group was found and removed from the store.
JobPersistenceException
public Trigger retrieveTrigger(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
throws JobPersistenceException
Retrieve the given .Trigger
triggerName - The name of the Trigger to be retrieved.groupName - The group name of the Trigger to be retrieved.
Trigger, or null if there is no match.
JobPersistenceException
public void storeCalendar(SchedulingContext ctxt,
java.lang.String calName,
Calendar calendar,
boolean replaceExisting)
throws ObjectAlreadyExistsException,
JobPersistenceException
Store the given .Calendar
calName - The name of the calendar.calendar - The Calendar to be stored.replaceExisting - If true, any Calendar
existing in the JobStore with the same name & group should be
over-written.
ObjectAlreadyExistsException - if a Calendar with the
same name already exists, and replaceExisting is set to false.
JobPersistenceException
public boolean removeCalendar(SchedulingContext ctxt,
java.lang.String calName)
throws JobPersistenceException
Remove (delete) the with the
given name.Calendar
If removal of the Calendar would result in
JobPersistenceException will be thrown.
calName - The name of the Calendar to be removed.
true if a Calendar with the given name
was found and removed from the store.
JobPersistenceException
public Calendar retrieveCalendar(SchedulingContext ctxt,
java.lang.String calName)
throws JobPersistenceException
Retrieve the given .Trigger
calName - The name of the Calendar to be retrieved.
Calendar, or null if there is no match.
JobPersistenceException
public int getNumberOfJobs(SchedulingContext ctxt)
throws JobPersistenceException
Get the number of s that are stored
in the JobJobStore.
JobPersistenceException
public int getNumberOfTriggers(SchedulingContext ctxt)
throws JobPersistenceException
Get the number of s that are
stored in the TriggerJobsStore.
JobPersistenceException
public int getNumberOfCalendars(SchedulingContext ctxt)
throws JobPersistenceException
Get the number of s that are
stored in the CalendarJobsStore.
JobPersistenceException
public java.lang.String[] getJobNames(SchedulingContext ctxt,
java.lang.String groupName)
throws JobPersistenceException
Get the names of all of the s that
have the given group name.Job
If there are no jobs in the given group name, the result should be
a zero-length array (not null).
JobPersistenceException
public java.lang.String[] getTriggerNames(SchedulingContext ctxt,
java.lang.String groupName)
throws JobPersistenceException
Get the names of all of the s
that have the given group name.Trigger
If there are no triggers in the given group name, the result should be
a zero-length array (not null).
JobPersistenceException
public java.lang.String[] getJobGroupNames(SchedulingContext ctxt)
throws JobPersistenceException
Get the names of all of the
groups.Job
If there are no known group names, the result should be a zero-length
array (not null).
JobPersistenceException
public java.lang.String[] getTriggerGroupNames(SchedulingContext ctxt)
throws JobPersistenceException
Get the names of all of the
groups.Trigger
If there are no known group names, the result should be a zero-length
array (not null).
JobPersistenceException
public java.lang.String[] getCalendarNames(SchedulingContext ctxt)
throws JobPersistenceException
Get the names of all of the s
in the CalendarJobStore.
If there are no Calendars in the given group name, the result should be
a zero-length array (not null).
JobPersistenceException
public Trigger[] getTriggersForJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
throws JobPersistenceException
Get all of the Triggers that are associated to the given Job.
If there are no matches, a zero-length array should be returned.
JobPersistenceException
public int getTriggerState(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
throws JobPersistenceException
Get the current state of the identified
.Trigger
JobPersistenceExceptionTrigger.STATE_NORMAL,
Trigger.STATE_PAUSED,
Trigger.STATE_COMPLETE,
Trigger.STATE_ERROR,
Trigger.STATE_NONE
public void pauseTrigger(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
throws JobPersistenceException
Pause the with the given name.Trigger
JobPersistenceExceptionresumeTrigger(SchedulingContext, String, String)
public void pauseTriggerGroup(SchedulingContext ctxt,
java.lang.String groupName)
throws JobPersistenceException
Pause all of the in the given group.Triggers
JobPersistenceExceptionresumeTriggerGroup(SchedulingContext, String)
public void pauseJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
throws JobPersistenceException
Pause the with the given name - by pausing
all of its current JobTriggers.
JobPersistenceExceptionresumeJob(SchedulingContext, String, String)
public void pauseJobGroup(SchedulingContext ctxt,
java.lang.String groupName)
throws JobPersistenceException
Pause all of the in the given group - by
pausing all of their JobsTriggers.
JobPersistenceExceptionresumeJobGroup(SchedulingContext, String)
public void resumeTrigger(SchedulingContext ctxt,
java.lang.String triggerName,
java.lang.String groupName)
throws JobPersistenceException
Resume (un-pause) the with the given
name.Trigger
If the Trigger missed one or more fire-times, then the
Trigger's misfire instruction will be applied.
JobPersistenceExceptionpauseTrigger(SchedulingContext, String, String)
public void resumeTriggerGroup(SchedulingContext ctxt,
java.lang.String groupName)
throws JobPersistenceException
Resume (un-pause) all of the in the given
group.Triggers
If any Trigger missed one or more fire-times, then the
Trigger's misfire instruction will be applied.
JobPersistenceExceptionpauseTriggerGroup(SchedulingContext, String)
public void resumeJob(SchedulingContext ctxt,
java.lang.String jobName,
java.lang.String groupName)
throws JobPersistenceException
Resume (un-pause) the with the given
name.Job
If any of the Job's Triggers missed one or
more fire-times, then the Trigger's misfire instruction will
be applied.
JobPersistenceExceptionpauseJob(SchedulingContext, String, String)
public void resumeJobGroup(SchedulingContext ctxt,
java.lang.String groupName)
throws JobPersistenceException
Resume (un-pause) all of the in the given
group.Jobs
If any of the Jobs had Triggers that missed
one or more fire-times, then the Trigger's misfire
instruction will be applied.
JobPersistenceExceptionpauseJobGroup(SchedulingContext, String)
public void pauseAll(SchedulingContext ctxt)
throws JobPersistenceException
Pause all triggers - equivalent of calling
pauseTriggerGroup(group) on every group.
When resumeAll() is called (to un-pause), trigger misfire
instructions WILL be applied.
JobPersistenceExceptionresumeAll(SchedulingContext),
pauseTriggerGroup(SchedulingContext, String)
public void resumeAll(SchedulingContext ctxt)
throws JobPersistenceException
Resume (un-pause) all triggers - equivalent of calling
resumeTriggerGroup(group) on every group.
If any Trigger missed one or more fire-times, then the
Trigger's misfire instruction will be applied.
JobPersistenceExceptionpauseAll(SchedulingContext)
public Trigger acquireNextTrigger(SchedulingContext ctxt)
throws JobPersistenceException
Get a handle to the next trigger to be fired, and mark it as 'reserved' by the calling scheduler.
JobPersistenceExceptionreleaseAcquiredTrigger(SchedulingContext, Trigger)
public void releaseAcquiredTrigger(SchedulingContext ctxt,
Trigger trigger)
throws JobPersistenceException
Inform the JobStore that the scheduler no longer plans to
fire the given Trigger, that it had previously acquired
(reserved).
JobPersistenceException
public TriggerFiredBundle triggerFired(SchedulingContext ctxt,
Trigger trigger)
throws JobPersistenceException
Inform the JobStore that the scheduler is now firing the
given Trigger (executing its associated Job),
that it had previously acquired (reserved).
JobPersistenceException
public void triggeredJobComplete(SchedulingContext ctxt,
Trigger trigger,
JobDetail jobDetail,
int triggerInstCode)
throws JobPersistenceException
Inform the JobStore that the scheduler has
completed the firing of the given Trigger (and the
execution its associated Job), and that the
in the given
JobDataMapJobDetail should be updated if the
Job is stateful.
JobPersistenceException
protected boolean doRecoverMisfires()
throws JobPersistenceException
doRecoverMisfires in class JobStoreSupportJobPersistenceException
protected boolean doCheckin()
throws JobPersistenceException
doCheckin in class JobStoreSupportJobPersistenceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||