Save This Page
Home » quartz-1.6.0 » org » quartz » simpl » [javadoc | source]
org.quartz.simpl
public class: RAMJobStore [javadoc | source]
java.lang.Object
   org.quartz.simpl.RAMJobStore

All Implemented Interfaces:
    JobStore

This class implements a org.quartz.spi.JobStore that utilizes RAM as its storage device.

As you should know, the ramification of this is that access is extrememly fast, but the data is completely volatile - therefore this JobStore should not be used if true persistence between program shutdowns is required.

Field Summary
protected  HashMap jobsByFQN     
protected  HashMap triggersByFQN     
protected  HashMap jobsByGroup     
protected  HashMap triggersByGroup     
protected  TreeSet timeTriggers     
protected  HashMap calendarsByName     
protected  ArrayList triggers     
protected final  Object jobLock     
protected final  Object triggerLock     
protected  HashSet pausedTriggerGroups     
protected  HashSet blockedJobs     
protected  long misfireThreshold     
protected  SchedulerSignaler signaler     
Constructor:
 public RAMJobStore() 
Method from org.quartz.simpl.RAMJobStore Summary:
acquireNextTrigger,   applyMisfire,   getCalendarNames,   getFiredTriggerRecordId,   getJobGroupNames,   getJobNames,   getLog,   getMisfireThreshold,   getNumberOfCalendars,   getNumberOfJobs,   getNumberOfTriggers,   getPausedTriggerGroups,   getTriggerGroupNames,   getTriggerNames,   getTriggerState,   getTriggerWrappersForCalendar,   getTriggerWrappersForJob,   getTriggersForJob,   initialize,   pauseAll,   pauseJob,   pauseJobGroup,   pauseTrigger,   pauseTriggerGroup,   peekTriggers,   releaseAcquiredTrigger,   removeCalendar,   removeJob,   removeTrigger,   replaceTrigger,   resumeAll,   resumeJob,   resumeJobGroup,   resumeTrigger,   resumeTriggerGroup,   retrieveCalendar,   retrieveJob,   retrieveTrigger,   schedulerStarted,   setAllTriggersOfJobToState,   setMisfireThreshold,   shutdown,   storeCalendar,   storeJob,   storeJobAndTrigger,   storeTrigger,   supportsPersistence,   triggerFired,   triggeredJobComplete
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.quartz.simpl.RAMJobStore Detail:
 public Trigger acquireNextTrigger(SchedulingContext ctxt,
    long noLaterThan) 

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

 protected boolean applyMisfire(TriggerWrapper tw) 
 public String[] getCalendarNames(SchedulingContext ctxt) 

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

 protected synchronized String getFiredTriggerRecordId() 
 public String[] getJobGroupNames(SchedulingContext ctxt) 
 public String[] getJobNames(SchedulingContext ctxt,
    String groupName) 

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

 protected Log getLog() 
 public long getMisfireThreshold() 
 public int getNumberOfCalendars(SchedulingContext ctxt) 
 public int getNumberOfJobs(SchedulingContext ctxt) 
 public int getNumberOfTriggers(SchedulingContext ctxt) 
 public Set getPausedTriggerGroups(SchedulingContext ctxt) throws JobPersistenceException 
 public String[] getTriggerGroupNames(SchedulingContext ctxt) 
 public String[] getTriggerNames(SchedulingContext ctxt,
    String groupName) 
 public int getTriggerState(SchedulingContext ctxt,
    String triggerName,
    String groupName) throws JobPersistenceException 

    Get the current state of the identified Trigger .

 protected ArrayList getTriggerWrappersForCalendar(String calName) 
 protected ArrayList getTriggerWrappersForJob(String jobName,
    String groupName) 
 public Trigger[] getTriggersForJob(SchedulingContext ctxt,
    String jobName,
    String groupName) 

    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) 

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

 public  void pauseAll(SchedulingContext ctxt) 

    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) 
 public  void pauseJobGroup(SchedulingContext ctxt,
    String groupName) 

    Pause all of the org.quartz.JobDetail 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) 

    Pause the Trigger with the given name.

 public  void pauseTriggerGroup(SchedulingContext ctxt,
    String groupName) 

    Pause all of the 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.

 protected String peekTriggers() 
 public  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).

 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) 
 public boolean removeTrigger(SchedulingContext ctxt,
    String triggerName,
    String groupName) 
 public boolean replaceTrigger(SchedulingContext ctxt,
    String triggerName,
    String groupName,
    Trigger newTrigger) throws JobPersistenceException 
 public  void resumeAll(SchedulingContext ctxt) 

    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) 

    Resume (un-pause) the org.quartz.JobDetail 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) 

    Resume (un-pause) all of the org.quartz.JobDetail 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) 

    Resume (un-pause) the 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) 

    Resume (un-pause) all of the 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) 
 public JobDetail retrieveJob(SchedulingContext ctxt,
    String jobName,
    String groupName) 
 public Trigger retrieveTrigger(SchedulingContext ctxt,
    String triggerName,
    String groupName) 
 public  void schedulerStarted() throws SchedulerException 
 protected  void setAllTriggersOfJobToState(String jobName,
    String jobGroup,
    int state) 
 public  void setMisfireThreshold(long misfireThreshold) 
    The number of milliseconds by which a trigger must have missed its next-fire-time, in order for it to be considered "misfired" and thus have its misfire instruction applied.
 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 ObjectAlreadyExistsException 
 public  void storeJob(SchedulingContext ctxt,
    JobDetail newJob,
    boolean replaceExisting) throws ObjectAlreadyExistsException 
 public  void storeJobAndTrigger(SchedulingContext ctxt,
    JobDetail newJob,
    Trigger newTrigger) throws JobPersistenceException 
 public  void storeTrigger(SchedulingContext ctxt,
    Trigger newTrigger,
    boolean replaceExisting) throws JobPersistenceException 
 public boolean supportsPersistence() 
 public 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).

 public  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 org.quartz.JobDataMap in the given JobDetail should be updated if the Job is stateful.