Home » quartz-1.6.0 » org » quartz » spi » [javadoc | source]
org.quartz.spi
public interface: JobStore [javadoc | source]

All Known Implementing Classes:
    JobStoreSupport, JobStoreTX, JobStoreCMT, RAMJobStore

The interface to be implemented by classes that want to provide a org.quartz.Job and org.quartz.Trigger storage mechanism for the org.quartz.core.QuartzScheduler 's use.

Storage of Job s and Trigger s should be keyed on the combination of their name and group for uniqueness.

Method from org.quartz.spi.JobStore Summary:
acquireNextTrigger,   getCalendarNames,   getJobGroupNames,   getJobNames,   getNumberOfCalendars,   getNumberOfJobs,   getNumberOfTriggers,   getPausedTriggerGroups,   getTriggerGroupNames,   getTriggerNames,   getTriggerState,   getTriggersForJob,   initialize,   pauseAll,   pauseJob,   pauseJobGroup,   pauseTrigger,   pauseTriggerGroup,   releaseAcquiredTrigger,   removeCalendar,   removeJob,   removeTrigger,   replaceTrigger,   resumeAll,   resumeJob,   resumeJobGroup,   resumeTrigger,   resumeTriggerGroup,   retrieveCalendar,   retrieveJob,   retrieveTrigger,   schedulerStarted,   shutdown,   storeCalendar,   storeJob,   storeJobAndTrigger,   storeTrigger,   supportsPersistence,   triggerFired,   triggeredJobComplete
Method from org.quartz.spi.JobStore Detail:
 public Trigger acquireNextTrigger(SchedulingContext ctxt,
    long noLaterThan) throws JobPersistenceException

    Get a handle to the next trigger to be fired, and mark it as 'reserved' by the calling scheduler.

 public String[] getCalendarNames(SchedulingContext ctxt) throws JobPersistenceException

    Get the names of all of the org.quartz.Calendar s in the JobStore.

    If there are no Calendars in the given group name, the result should be a zero-length array (not null).

 public String[] getJobGroupNames(SchedulingContext ctxt) throws JobPersistenceException

    Get the names of all of the org.quartz.Job groups.

    If there are no known group names, the result should be a zero-length array (not null).

 public String[] getJobNames(SchedulingContext ctxt,
    String groupName) throws JobPersistenceException

    Get the names of all of the org.quartz.Job s that have the given group name.

    If there are no jobs in the given group name, the result should be a zero-length array (not null).

 public int getNumberOfCalendars(SchedulingContext ctxt) throws JobPersistenceException
 public int getNumberOfJobs(SchedulingContext ctxt) throws JobPersistenceException

    Get the number of org.quartz.Job s that are stored in the JobsStore.

 public int getNumberOfTriggers(SchedulingContext ctxt) throws JobPersistenceException
 public Set getPausedTriggerGroups(SchedulingContext ctxt) throws JobPersistenceException
 public String[] getTriggerGroupNames(SchedulingContext ctxt) throws JobPersistenceException

    Get the names of all of the org.quartz.Trigger groups.

    If there are no known group names, the result should be a zero-length array (not null).

 public String[] getTriggerNames(SchedulingContext ctxt,
    String groupName) throws JobPersistenceException

    Get the names of all of the org.quartz.Trigger s that have the given group name.

    If there are no triggers in the given group name, the result should be a zero-length array (not null).

 public int getTriggerState(SchedulingContext ctxt,
    String triggerName,
    String triggerGroup) throws JobPersistenceException

    Get the current state of the identified Trigger .

 public Trigger[] getTriggersForJob(SchedulingContext ctxt,
    String jobName,
    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.

 public  void initialize(ClassLoadHelper loadHelper,
    SchedulerSignaler signaler) throws SchedulerConfigException

    Called by the QuartzScheduler before the JobStore is used, in order to give the it a chance to initialize.

 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.

 public  void pauseJob(SchedulingContext ctxt,
    String jobName,
    String groupName) throws JobPersistenceException

    Pause the org.quartz.Job with the given name - by pausing all of its current Triggers.

 public  void pauseJobGroup(SchedulingContext ctxt,
    String groupName) throws JobPersistenceException

    Pause all of the org.quartz.Job s in the given group - by pausing all of their Triggers.

    The JobStore should "remember" that the group is paused, and impose the pause on any new jobs that are added to the group while the group is paused.

 public  void pauseTrigger(SchedulingContext ctxt,
    String triggerName,
    String groupName) throws JobPersistenceException
 public  void pauseTriggerGroup(SchedulingContext ctxt,
    String groupName) throws JobPersistenceException

    Pause all of the org.quartz.Trigger s in the given group.

    The JobStore should "remember" that the group is paused, and impose the pause on any new triggers that are added to the group while the group is paused.

 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).

 public boolean removeCalendar(SchedulingContext ctxt,
    String calName) throws JobPersistenceException

    Remove (delete) the org.quartz.Calendar with the given name.

    If removal of the Calendar would result in s pointing to non-existent calendars, then a JobPersistenceException will be thrown.

    *
 public boolean removeJob(SchedulingContext ctxt,
    String jobName,
    String groupName) throws JobPersistenceException

    Remove (delete) the org.quartz.Job with the given name, and any org.quartz.Trigger s that reference it.

    If removal of the Job results in an empty group, the group should be removed from the JobStore's list of known group names.

 public boolean removeTrigger(SchedulingContext ctxt,
    String triggerName,
    String groupName) throws JobPersistenceException

    Remove (delete) the org.quartz.Trigger with the given name.

    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.

 public boolean replaceTrigger(SchedulingContext ctxt,
    String triggerName,
    String groupName,
    Trigger newTrigger) throws JobPersistenceException

    Remove (delete) the org.quartz.Trigger with the given name, and store the new given one - which must be associated with the same job.

 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.

 public  void resumeJob(SchedulingContext ctxt,
    String jobName,
    String groupName) throws JobPersistenceException

    Resume (un-pause) the org.quartz.Job with the given name.

    If any of the Job'sTrigger s missed one or more fire-times, then the Trigger's misfire instruction will be applied.

 public  void resumeJobGroup(SchedulingContext ctxt,
    String groupName) throws JobPersistenceException

    Resume (un-pause) all of the org.quartz.Job s in the given group.

    If any of the Job s had Trigger s that missed one or more fire-times, then the Trigger's misfire instruction will be applied.

 public  void resumeTrigger(SchedulingContext ctxt,
    String triggerName,
    String groupName) throws JobPersistenceException

    Resume (un-pause) the org.quartz.Trigger with the given name.

    If the Trigger missed one or more fire-times, then the Trigger's misfire instruction will be applied.

 public  void resumeTriggerGroup(SchedulingContext ctxt,
    String groupName) throws JobPersistenceException

    Resume (un-pause) all of the org.quartz.Trigger s in the given group.

    If any Trigger missed one or more fire-times, then the Trigger's misfire instruction will be applied.

 public Calendar retrieveCalendar(SchedulingContext ctxt,
    String calName) throws JobPersistenceException
 public JobDetail retrieveJob(SchedulingContext ctxt,
    String jobName,
    String groupName) throws JobPersistenceException
 public Trigger retrieveTrigger(SchedulingContext ctxt,
    String triggerName,
    String groupName) throws JobPersistenceException
 public  void schedulerStarted() throws SchedulerException

    Called by the QuartzScheduler to inform the JobStore that the scheduler has started.

 public  void shutdown()

    Called by the QuartzScheduler to inform the JobStore that it should free up all of it's resources because the scheduler is shutting down.

 public  void storeCalendar(SchedulingContext ctxt,
    String name,
    Calendar calendar,
    boolean replaceExisting,
    boolean updateTriggers) throws JobPersistenceException, ObjectAlreadyExistsException
 public  void storeJob(SchedulingContext ctxt,
    JobDetail newJob,
    boolean replaceExisting) throws JobPersistenceException, ObjectAlreadyExistsException
 public  void storeJobAndTrigger(SchedulingContext ctxt,
    JobDetail newJob,
    Trigger newTrigger) throws JobPersistenceException, ObjectAlreadyExistsException
 public  void storeTrigger(SchedulingContext ctxt,
    Trigger newTrigger,
    boolean replaceExisting) throws JobPersistenceException, ObjectAlreadyExistsException
 public boolean supportsPersistence()
 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).

 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 of its associated Job completed, threw an exception, or was vetoed), and that the org.quartz.JobDataMap in the given JobDetail should be updated if the Job is stateful.