org.quartz.simpl
Class RAMJobStore

java.lang.Object
  extended by org.quartz.simpl.RAMJobStore
All Implemented Interfaces:
JobStore

public class RAMJobStore
extends java.lang.Object
implements JobStore

This class implements a 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.

Author:
James House, Sharada Jambula, Eric Mueller

Field Summary
protected  java.util.HashSet<JobKey> blockedJobs
           
protected  java.util.HashMap<java.lang.String,Calendar> calendarsByName
           
protected  java.util.HashMap<java.lang.String,java.util.HashMap<JobKey,org.quartz.simpl.JobWrapper>> jobsByGroup
           
protected  java.util.HashMap<JobKey,org.quartz.simpl.JobWrapper> jobsByKey
           
protected  java.lang.Object lock
           
protected  long misfireThreshold
           
protected  java.util.HashSet<java.lang.String> pausedJobGroups
           
protected  java.util.HashSet<java.lang.String> pausedTriggerGroups
           
protected  SchedulerSignaler signaler
           
protected  java.util.TreeSet<org.quartz.simpl.TriggerWrapper> timeTriggers
           
protected  java.util.ArrayList<org.quartz.simpl.TriggerWrapper> triggers
           
protected  java.util.HashMap<java.lang.String,java.util.HashMap<TriggerKey,org.quartz.simpl.TriggerWrapper>> triggersByGroup
           
protected  java.util.HashMap<TriggerKey,org.quartz.simpl.TriggerWrapper> triggersByKey
           
 
Constructor Summary
RAMJobStore()
           Create a new RAMJobStore.
 
Method Summary
 java.util.List<OperableTrigger> acquireNextTriggers(long noLaterThan, int maxCount, long timeWindow)
           Get a handle to the next trigger to be fired, and mark it as 'reserved' by the calling scheduler.
protected  boolean applyMisfire(org.quartz.simpl.TriggerWrapper tw)
           
 boolean checkExists(JobKey jobKey)
          Determine whether a Job with the given identifier already exists within the scheduler.
 boolean checkExists(TriggerKey triggerKey)
          Determine whether a Trigger with the given identifier already exists within the scheduler.
 void clearAllSchedulingData()
          Clear (delete!) all scheduling data - all Jobs, Triggers Calendars.
 java.util.List<java.lang.String> getCalendarNames()
           Get the names of all of the Calendar s in the JobStore.
 long getEstimatedTimeToReleaseAndAcquireTrigger()
          How long (in milliseconds) the JobStore implementation estimates that it will take to release a trigger and acquire a new one.
protected  java.lang.String getFiredTriggerRecordId()
           
 java.util.List<java.lang.String> getJobGroupNames()
           Get the names of all of the Job groups.
 java.util.Set<JobKey> getJobKeys(GroupMatcher<JobKey> matcher)
           Get the names of all of the Job s that match the given groupMatcher.
protected  org.slf4j.Logger getLog()
           
 long getMisfireThreshold()
           
 int getNumberOfCalendars()
           Get the number of Calendar s that are stored in the JobsStore.
 int getNumberOfJobs()
           Get the number of JobDetail s that are stored in the JobsStore.
 int getNumberOfTriggers()
           Get the number of Trigger s that are stored in the JobsStore.
 java.util.Set getPausedTriggerGroups()
           
 java.util.List<java.lang.String> getTriggerGroupNames()
           Get the names of all of the Trigger groups.
 java.util.Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher)
           Get the names of all of the Trigger s that match the given groupMatcher.
 java.util.List<OperableTrigger> getTriggersForJob(JobKey jobKey)
           Get all of the Triggers that are associated to the given Job.
 Trigger.TriggerState getTriggerState(TriggerKey triggerKey)
           Get the current state of the identified Trigger.
protected  java.util.ArrayList<org.quartz.simpl.TriggerWrapper> getTriggerWrappersForCalendar(java.lang.String calName)
           
protected  java.util.ArrayList<org.quartz.simpl.TriggerWrapper> getTriggerWrappersForJob(JobKey jobKey)
           
 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.
 boolean isClustered()
          Whether or not the JobStore implementation is clustered.
 void pauseAll()
           Pause all triggers - equivalent of calling pauseTriggerGroup(group) on every group.
 void pauseJob(JobKey jobKey)
           Pause the JobDetail with the given name - by pausing all of its current Triggers.
 java.util.List<java.lang.String> pauseJobs(GroupMatcher<JobKey> matcher)
           Pause all of the JobDetails in the given group - by pausing all of their Triggers.
 void pauseTrigger(TriggerKey triggerKey)
           Pause the Trigger with the given name.
 java.util.List<java.lang.String> pauseTriggers(GroupMatcher<TriggerKey> matcher)
           Pause all of the known Triggers matching.
protected  java.lang.String peekTriggers()
           
 void releaseAcquiredTrigger(OperableTrigger trigger)
           Inform the JobStore that the scheduler no longer plans to fire the given Trigger, that it had previously acquired (reserved).
 boolean removeCalendar(java.lang.String calName)
           Remove (delete) the Calendar with the given name.
 boolean removeJob(JobKey jobKey)
           Remove (delete) the Job with the given name, and any Trigger s that reference it.
 boolean removeJobs(java.util.List<JobKey> jobKeys)
           
 boolean removeTrigger(TriggerKey triggerKey)
           Remove (delete) the Trigger with the given name.
 boolean removeTriggers(java.util.List<TriggerKey> triggerKeys)
           
 boolean replaceTrigger(TriggerKey triggerKey, OperableTrigger newTrigger)
          Remove (delete) the Trigger with the given key, and store the new given one - which must be associated with the same job.
 void resumeAll()
           Resume (un-pause) all triggers - equivalent of calling resumeTriggerGroup(group) on every group.
 void resumeJob(JobKey jobKey)
           Resume (un-pause) the JobDetail with the given name.
 java.util.Collection<java.lang.String> resumeJobs(GroupMatcher<JobKey> matcher)
           Resume (un-pause) all of the JobDetails in the given group.
 void resumeTrigger(TriggerKey triggerKey)
           Resume (un-pause) the Trigger with the given key.
 java.util.List<java.lang.String> resumeTriggers(GroupMatcher<TriggerKey> matcher)
           Resume (un-pause) all of the Triggers in the given group.
 Calendar retrieveCalendar(java.lang.String calName)
           Retrieve the given Trigger.
 JobDetail retrieveJob(JobKey jobKey)
           Retrieve the JobDetail for the given Job.
 OperableTrigger retrieveTrigger(TriggerKey triggerKey)
           Retrieve the given Trigger.
 void schedulerStarted()
          Called by the QuartzScheduler to inform the JobStore that the scheduler has started.
protected  void setAllTriggersOfJobToState(JobKey jobKey, int state)
           
 void setInstanceId(java.lang.String schedInstId)
          Inform the JobStore of the Scheduler instance's Id, prior to initialize being invoked.
 void setInstanceName(java.lang.String schedName)
          Inform the JobStore of the Scheduler instance's name, prior to initialize being invoked.
 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.
 void setThreadPoolSize(int poolSize)
          Tells the JobStore the pool size used to execute jobs
 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.
 void storeCalendar(java.lang.String name, Calendar calendar, boolean replaceExisting, boolean updateTriggers)
           Store the given Calendar.
 void storeJob(JobDetail newJob, boolean replaceExisting)
           Store the given Job.
 void storeJobAndTrigger(JobDetail newJob, OperableTrigger newTrigger)
           Store the given JobDetail and Trigger.
 void storeJobsAndTriggers(java.util.Map<JobDetail,java.util.List<Trigger>> triggersAndJobs, boolean replace)
           
 void storeTrigger(OperableTrigger newTrigger, boolean replaceExisting)
           Store the given Trigger.
 boolean supportsPersistence()
           
 void triggeredJobComplete(OperableTrigger trigger, JobDetail jobDetail, Trigger.CompletedExecutionInstruction triggerInstCode)
           Inform the JobStore that the scheduler has completed the firing of the given Trigger (and the execution its associated Job), and that the JobDataMap in the given JobDetail should be updated if the Job is stateful.
 java.util.List<TriggerFiredResult> triggersFired(java.util.List<OperableTrigger> triggers)
           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
 

Field Detail

jobsByKey

protected java.util.HashMap<JobKey,org.quartz.simpl.JobWrapper> jobsByKey

triggersByKey

protected java.util.HashMap<TriggerKey,org.quartz.simpl.TriggerWrapper> triggersByKey

jobsByGroup

protected java.util.HashMap<java.lang.String,java.util.HashMap<JobKey,org.quartz.simpl.JobWrapper>> jobsByGroup

triggersByGroup

protected java.util.HashMap<java.lang.String,java.util.HashMap<TriggerKey,org.quartz.simpl.TriggerWrapper>> triggersByGroup

timeTriggers

protected java.util.TreeSet<org.quartz.simpl.TriggerWrapper> timeTriggers

calendarsByName

protected java.util.HashMap<java.lang.String,Calendar> calendarsByName

triggers

protected java.util.ArrayList<org.quartz.simpl.TriggerWrapper> triggers

lock

protected final java.lang.Object lock

pausedTriggerGroups

protected java.util.HashSet<java.lang.String> pausedTriggerGroups

pausedJobGroups

protected java.util.HashSet<java.lang.String> pausedJobGroups

blockedJobs

protected java.util.HashSet<JobKey> blockedJobs

misfireThreshold

protected long misfireThreshold

signaler

protected SchedulerSignaler signaler
Constructor Detail

RAMJobStore

public RAMJobStore()

Create a new RAMJobStore.

Method Detail

getLog

protected org.slf4j.Logger getLog()

initialize

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.

Specified by:
initialize in interface JobStore

schedulerStarted

public void schedulerStarted()
                      throws SchedulerException
Description copied from interface: JobStore
Called by the QuartzScheduler to inform the JobStore that the scheduler has started.

Specified by:
schedulerStarted in interface JobStore
Throws:
SchedulerException

getMisfireThreshold

public long getMisfireThreshold()

setMisfireThreshold

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.

Parameters:
misfireThreshold -

shutdown

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.

Specified by:
shutdown in interface JobStore

supportsPersistence

public boolean supportsPersistence()
Specified by:
supportsPersistence in interface JobStore

clearAllSchedulingData

public void clearAllSchedulingData()
                            throws JobPersistenceException
Clear (delete!) all scheduling data - all Jobs, Triggers Calendars.

Specified by:
clearAllSchedulingData in interface JobStore
Throws:
JobPersistenceException

storeJobAndTrigger

public void storeJobAndTrigger(JobDetail newJob,
                               OperableTrigger newTrigger)
                        throws JobPersistenceException

Store the given JobDetail and Trigger.

Specified by:
storeJobAndTrigger in interface JobStore
Parameters:
newJob - The JobDetail to be stored.
newTrigger - The Trigger to be stored.
Throws:
ObjectAlreadyExistsException - if a Job with the same name/group already exists.
JobPersistenceException

storeJob

public void storeJob(JobDetail newJob,
                     boolean replaceExisting)
              throws ObjectAlreadyExistsException

Store the given Job.

Specified by:
storeJob in interface JobStore
Parameters:
newJob - The Job to be stored.
replaceExisting - If true, any Job existing in the JobStore with the same name & group should be over-written.
Throws:
ObjectAlreadyExistsException - if a Job with the same name/group already exists, and replaceExisting is set to false.

removeJob

public boolean removeJob(JobKey jobKey)

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

Specified by:
removeJob in interface JobStore
Returns:
true if a Job with the given name & group was found and removed from the store.

removeJobs

public boolean removeJobs(java.util.List<JobKey> jobKeys)
                   throws JobPersistenceException
Specified by:
removeJobs in interface JobStore
Throws:
JobPersistenceException

removeTriggers

public boolean removeTriggers(java.util.List<TriggerKey> triggerKeys)
                       throws JobPersistenceException
Specified by:
removeTriggers in interface JobStore
Throws:
JobPersistenceException

storeJobsAndTriggers

public void storeJobsAndTriggers(java.util.Map<JobDetail,java.util.List<Trigger>> triggersAndJobs,
                                 boolean replace)
                          throws ObjectAlreadyExistsException,
                                 JobPersistenceException
Specified by:
storeJobsAndTriggers in interface JobStore
Throws:
ObjectAlreadyExistsException
JobPersistenceException

storeTrigger

public void storeTrigger(OperableTrigger newTrigger,
                         boolean replaceExisting)
                  throws JobPersistenceException

Store the given Trigger.

Specified by:
storeTrigger in interface JobStore
Parameters:
newTrigger - The Trigger to be stored.
replaceExisting - If true, any Trigger existing in the JobStore with the same name & group should be over-written.
Throws:
ObjectAlreadyExistsException - if a Trigger with the same name/group already exists, and replaceExisting is set to false.
JobPersistenceException
See Also:
#pauseTriggerGroup(SchedulingContext, String)

removeTrigger

public boolean removeTrigger(TriggerKey triggerKey)

Remove (delete) the Trigger with the given name.

Specified by:
removeTrigger in interface JobStore
Returns:
true if a Trigger with the given name & group was found and removed from the store.

replaceTrigger

public boolean replaceTrigger(TriggerKey triggerKey,
                              OperableTrigger newTrigger)
                       throws JobPersistenceException
Description copied from interface: JobStore
Remove (delete) the Trigger with the given key, and store the new given one - which must be associated with the same job.

Specified by:
replaceTrigger in interface JobStore
newTrigger - The new Trigger to be stored.
Returns:
true if a Trigger with the given name & group was found and removed from the store.
Throws:
JobPersistenceException
See Also:
org.quartz.spi.JobStore#replaceTrigger(org.quartz.core.SchedulingContext, java.lang.String, java.lang.String, org.quartz.Trigger)

retrieveJob

public JobDetail retrieveJob(JobKey jobKey)

Retrieve the JobDetail for the given Job.

Specified by:
retrieveJob in interface JobStore
Returns:
The desired Job, or null if there is no match.

retrieveTrigger

public OperableTrigger retrieveTrigger(TriggerKey triggerKey)

Retrieve the given Trigger.

Specified by:
retrieveTrigger in interface JobStore
Returns:
The desired Trigger, or null if there is no match.

checkExists

public boolean checkExists(JobKey jobKey)
Determine whether a Job with the given identifier already exists within the scheduler.

Specified by:
checkExists in interface JobStore
Parameters:
jobKey - the identifier to check for
Returns:
true if a Job exists with the given identifier
Throws:
SchedulerException

checkExists

public boolean checkExists(TriggerKey triggerKey)
Determine whether a Trigger with the given identifier already exists within the scheduler.

Specified by:
checkExists in interface JobStore
Parameters:
triggerKey - the identifier to check for
Returns:
true if a Trigger exists with the given identifier
Throws:
SchedulerException

getTriggerState

public Trigger.TriggerState getTriggerState(TriggerKey triggerKey)
                                     throws JobPersistenceException

Get the current state of the identified Trigger.

Specified by:
getTriggerState in interface JobStore
Throws:
JobPersistenceException
See Also:
Trigger#NORMAL, Trigger#PAUSED, Trigger#COMPLETE, Trigger#ERROR, Trigger#BLOCKED, Trigger#NONE

storeCalendar

public void storeCalendar(java.lang.String name,
                          Calendar calendar,
                          boolean replaceExisting,
                          boolean updateTriggers)
                   throws ObjectAlreadyExistsException

Store the given Calendar.

Specified by:
storeCalendar in interface JobStore
Parameters:
calendar - The Calendar to be stored.
replaceExisting - If true, any Calendar existing in the JobStore with the same name & group should be over-written.
updateTriggers - If true, any Triggers existing in the JobStore that reference an existing Calendar with the same name with have their next fire time re-computed with the new Calendar.
Throws:
ObjectAlreadyExistsException - if a Calendar with the same name already exists, and replaceExisting is set to false.

removeCalendar

public boolean removeCalendar(java.lang.String calName)
                       throws JobPersistenceException

Remove (delete) the Calendar with the given name.

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

*

Specified by:
removeCalendar in interface JobStore
Parameters:
calName - The name of the Calendar to be removed.
Returns:
true if a Calendar with the given name was found and removed from the store.
Throws:
JobPersistenceException

retrieveCalendar

public Calendar retrieveCalendar(java.lang.String calName)

Retrieve the given Trigger.

Specified by:
retrieveCalendar in interface JobStore
Parameters:
calName - The name of the Calendar to be retrieved.
Returns:
The desired Calendar, or null if there is no match.

getNumberOfJobs

public int getNumberOfJobs()

Get the number of JobDetail s that are stored in the JobsStore.

Specified by:
getNumberOfJobs in interface JobStore

getNumberOfTriggers

public int getNumberOfTriggers()

Get the number of Trigger s that are stored in the JobsStore.

Specified by:
getNumberOfTriggers in interface JobStore

getNumberOfCalendars

public int getNumberOfCalendars()

Get the number of Calendar s that are stored in the JobsStore.

Specified by:
getNumberOfCalendars in interface JobStore

getJobKeys

public java.util.Set<JobKey> getJobKeys(GroupMatcher<JobKey> matcher)

Get the names of all of the Job s that match the given groupMatcher.

Specified by:
getJobKeys in interface JobStore

getCalendarNames

public java.util.List<java.lang.String> getCalendarNames()

Get the names of all of the 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).

Specified by:
getCalendarNames in interface JobStore

getTriggerKeys

public java.util.Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher)

Get the names of all of the Trigger s that match the given groupMatcher.

Specified by:
getTriggerKeys in interface JobStore

getJobGroupNames

public java.util.List<java.lang.String> getJobGroupNames()

Get the names of all of the Job groups.

Specified by:
getJobGroupNames in interface JobStore

getTriggerGroupNames

public java.util.List<java.lang.String> getTriggerGroupNames()

Get the names of all of the Trigger groups.

Specified by:
getTriggerGroupNames in interface JobStore

getTriggersForJob

public java.util.List<OperableTrigger> getTriggersForJob(JobKey jobKey)

Get all of the Triggers that are associated to the given Job.

If there are no matches, a zero-length array should be returned.

Specified by:
getTriggersForJob in interface JobStore

getTriggerWrappersForJob

protected java.util.ArrayList<org.quartz.simpl.TriggerWrapper> getTriggerWrappersForJob(JobKey jobKey)

getTriggerWrappersForCalendar

protected java.util.ArrayList<org.quartz.simpl.TriggerWrapper> getTriggerWrappersForCalendar(java.lang.String calName)

pauseTrigger

public void pauseTrigger(TriggerKey triggerKey)

Pause the Trigger with the given name.

Specified by:
pauseTrigger in interface JobStore
See Also:
JobStore.resumeTrigger(TriggerKey)

pauseTriggers

public java.util.List<java.lang.String> pauseTriggers(GroupMatcher<TriggerKey> matcher)

Pause all of the known Triggers matching.

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

Specified by:
pauseTriggers in interface JobStore
See Also:
#resumeTriggerGroup(String)

pauseJob

public void pauseJob(JobKey jobKey)

Pause the JobDetail with the given name - by pausing all of its current Triggers.

Specified by:
pauseJob in interface JobStore
See Also:
JobStore.resumeJob(JobKey)

pauseJobs

public java.util.List<java.lang.String> pauseJobs(GroupMatcher<JobKey> matcher)

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

Specified by:
pauseJobs in interface JobStore
See Also:
#resumeJobGroup(String)

resumeTrigger

public void resumeTrigger(TriggerKey triggerKey)

Resume (un-pause) the Trigger with the given key.

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

Specified by:
resumeTrigger in interface JobStore
See Also:
JobStore.pauseTrigger(TriggerKey)

resumeTriggers

public java.util.List<java.lang.String> resumeTriggers(GroupMatcher<TriggerKey> matcher)

Resume (un-pause) all of the Triggers in the given group.

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

Specified by:
resumeTriggers in interface JobStore
See Also:
#pauseTriggers(String)

resumeJob

public void resumeJob(JobKey jobKey)

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

Specified by:
resumeJob in interface JobStore
See Also:
JobStore.pauseJob(JobKey)

resumeJobs

public java.util.Collection<java.lang.String> resumeJobs(GroupMatcher<JobKey> matcher)

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

Specified by:
resumeJobs in interface JobStore
See Also:
#pauseJobGroup(String)

pauseAll

public void pauseAll()

Pause all triggers - equivalent of calling pauseTriggerGroup(group) on every group.

When resumeAll() is called (to un-pause), trigger misfire instructions WILL be applied.

Specified by:
pauseAll in interface JobStore
See Also:
#resumeAll(SchedulingContext), #pauseTriggerGroup(SchedulingContext, String)

resumeAll

public void resumeAll()

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.

Specified by:
resumeAll in interface JobStore
See Also:
#pauseAll(SchedulingContext)

applyMisfire

protected boolean applyMisfire(org.quartz.simpl.TriggerWrapper tw)

getFiredTriggerRecordId

protected java.lang.String getFiredTriggerRecordId()

acquireNextTriggers

public java.util.List<OperableTrigger> acquireNextTriggers(long noLaterThan,
                                                           int maxCount,
                                                           long timeWindow)

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

Specified by:
acquireNextTriggers in interface JobStore
Parameters:
noLaterThan - If > 0, the JobStore should only return a Trigger that will fire no later than the time represented in this value as milliseconds.
See Also:
#releaseAcquiredTrigger(SchedulingContext, Trigger)

releaseAcquiredTrigger

public void releaseAcquiredTrigger(OperableTrigger trigger)

Inform the JobStore that the scheduler no longer plans to fire the given Trigger, that it had previously acquired (reserved).

Specified by:
releaseAcquiredTrigger in interface JobStore

triggersFired

public java.util.List<TriggerFiredResult> triggersFired(java.util.List<OperableTrigger> triggers)

Inform the JobStore that the scheduler is now firing the given Trigger (executing its associated Job), that it had previously acquired (reserved).

Specified by:
triggersFired in interface JobStore
Returns:
may return null if all the triggers or their calendars no longer exist, or if the trigger was not successfully put into the 'executing' state. Preference is to return an empty list if none of the triggers could be fired.

triggeredJobComplete

public void triggeredJobComplete(OperableTrigger trigger,
                                 JobDetail jobDetail,
                                 Trigger.CompletedExecutionInstruction triggerInstCode)

Inform the JobStore that the scheduler has completed the firing of the given Trigger (and the execution its associated Job), and that the JobDataMap in the given JobDetail should be updated if the Job is stateful.

Specified by:
triggeredJobComplete in interface JobStore

setAllTriggersOfJobToState

protected void setAllTriggersOfJobToState(JobKey jobKey,
                                          int state)

peekTriggers

protected java.lang.String peekTriggers()

getPausedTriggerGroups

public java.util.Set getPausedTriggerGroups()
                                     throws JobPersistenceException
Specified by:
getPausedTriggerGroups in interface JobStore
Throws:
JobPersistenceException
See Also:
org.quartz.spi.JobStore#getPausedTriggerGroups(org.quartz.core.SchedulingContext)

setInstanceId

public void setInstanceId(java.lang.String schedInstId)
Description copied from interface: JobStore
Inform the JobStore of the Scheduler instance's Id, prior to initialize being invoked.

Specified by:
setInstanceId in interface JobStore

setInstanceName

public void setInstanceName(java.lang.String schedName)
Description copied from interface: JobStore
Inform the JobStore of the Scheduler instance's name, prior to initialize being invoked.

Specified by:
setInstanceName in interface JobStore

setThreadPoolSize

public void setThreadPoolSize(int poolSize)
Description copied from interface: JobStore
Tells the JobStore the pool size used to execute jobs

Specified by:
setThreadPoolSize in interface JobStore
Parameters:
poolSize - amount of threads allocated for job execution

getEstimatedTimeToReleaseAndAcquireTrigger

public long getEstimatedTimeToReleaseAndAcquireTrigger()
Description copied from interface: JobStore
How long (in milliseconds) the JobStore implementation estimates that it will take to release a trigger and acquire a new one.

Specified by:
getEstimatedTimeToReleaseAndAcquireTrigger in interface JobStore

isClustered

public boolean isClustered()
Description copied from interface: JobStore
Whether or not the JobStore implementation is clustered.

Specified by:
isClustered in interface JobStore


Copyright 2001-2019, Terracotta, Inc.