public interface DriverDelegate
This is the base interface for all driver delegate classes.
This interface is very similar to the
interface except each method has an additional JobStore
parameter.
Connection
Unless a database driver has some extremely-DB-specific
requirements, any DriverDelegate implementation classes should extend the
class.
StdJDBCDelegate
| Modifier and Type | Method and Description |
|---|---|
boolean |
calendarExists(Connection conn,
String calendarName)
Check whether or not a calendar exists.
|
boolean |
calendarIsReferenced(Connection conn,
String calendarName)
Check whether or not a calendar is referenced by any triggers.
|
void |
clearData(Connection conn)
|
int |
countMisfiredTriggersInState(Connection conn,
String state1,
long ts)
Get the number of triggers in the given state that have
misfired - according to the given timestamp.
|
int |
deleteAllPausedTriggerGroups(Connection conn) |
int |
deleteCalendar(Connection conn,
String calendarName)
Delete a calendar.
|
int |
deleteFiredTrigger(Connection conn,
String entryId)
Delete a fired trigger.
|
int |
deleteFiredTriggers(Connection conn)
Delete all fired triggers.
|
int |
deleteFiredTriggers(Connection conn,
String instanceId)
Delete all fired triggers of the given instance.
|
int |
deleteJobDetail(Connection conn,
JobKey jobKey)
Delete the job detail record for the given job.
|
int |
deletePausedTriggerGroup(Connection conn,
GroupMatcher<TriggerKey> matcher) |
int |
deletePausedTriggerGroup(Connection conn,
String groupName) |
int |
deleteSchedulerState(Connection conn,
String instanceId)
Delete a scheduler-instance state record.
|
int |
deleteTrigger(Connection conn,
TriggerKey triggerKey)
Delete the base trigger data for a trigger.
|
boolean |
hasMisfiredTriggersInState(Connection conn,
String state1,
long ts,
int count,
List<TriggerKey> resultList)
Get the names of all of the triggers in the given states that have
misfired - according to the given timestamp.
|
void |
initialize(org.slf4j.Logger logger,
String tablePrefix,
String schedName,
String instanceId,
ClassLoadHelper classLoadHelper,
boolean useProperties,
String initString) |
int |
insertCalendar(Connection conn,
String calendarName,
Calendar calendar)
Insert a new calendar.
|
int |
insertFiredTrigger(Connection conn,
OperableTrigger trigger,
String state,
JobDetail jobDetail)
Insert a fired trigger.
|
int |
insertJobDetail(Connection conn,
JobDetail job)
Insert the job detail record.
|
int |
insertPausedTriggerGroup(Connection conn,
String groupName) |
int |
insertSchedulerState(Connection conn,
String instanceId,
long checkInTime,
long interval)
Insert a scheduler-instance state record.
|
int |
insertTrigger(Connection conn,
OperableTrigger trigger,
String state,
JobDetail jobDetail)
Insert the base trigger data.
|
boolean |
isExistingTriggerGroup(Connection conn,
String groupName) |
boolean |
isJobNonConcurrent(Connection conn,
JobKey jobKey)
Check whether or not the given job disallows concurrent execution.
|
boolean |
isTriggerGroupPaused(Connection conn,
String groupName) |
boolean |
jobExists(Connection conn,
JobKey jobKey)
Check whether or not the given job exists.
|
Calendar |
selectCalendar(Connection conn,
String calendarName)
Select a calendar.
|
List<String> |
selectCalendars(Connection conn)
Select all of the stored calendars.
|
Set<String> |
selectFiredTriggerInstanceNames(Connection conn)
Select the distinct instance names of all fired-trigger records.
|
List<FiredTriggerRecord> |
selectFiredTriggerRecords(Connection conn,
String triggerName,
String groupName)
Select the states of all fired-trigger records for a given trigger, or
trigger group if trigger name is
null. |
List<FiredTriggerRecord> |
selectFiredTriggerRecordsByJob(Connection conn,
String jobName,
String groupName)
Select the states of all fired-trigger records for a given job, or job
group if job name is
null. |
List<FiredTriggerRecord> |
selectInstancesFiredTriggerRecords(Connection conn,
String instanceName)
Select the states of all fired-trigger records for a given scheduler
instance.
|
JobDetail |
selectJobDetail(Connection conn,
JobKey jobKey,
ClassLoadHelper loadHelper)
Select the JobDetail object for a given job name / group name.
|
int |
selectJobExecutionCount(Connection conn,
JobKey jobKey)
Get the number instances of the identified job currently executing.
|
JobDetail |
selectJobForTrigger(Connection conn,
ClassLoadHelper loadHelper,
TriggerKey triggerKey)
Select the job to which the trigger is associated.
|
JobDetail |
selectJobForTrigger(Connection conn,
ClassLoadHelper loadHelper,
TriggerKey triggerKey,
boolean loadJobClass)
Select the job to which the trigger is associated.
|
List<String> |
selectJobGroups(Connection conn)
Select all of the job group names that are stored.
|
Set<JobKey> |
selectJobsInGroup(Connection conn,
GroupMatcher<JobKey> matcher)
Select all of the jobs contained in a given group.
|
List<TriggerKey> |
selectMisfiredTriggers(Connection conn,
long ts)
Get the names of all of the triggers that have misfired - according to
the given timestamp.
|
List<TriggerKey> |
selectMisfiredTriggersInGroupInState(Connection conn,
String groupName,
String state,
long ts)
Get the names of all of the triggers in the given group and state that
have misfired - according to the given timestamp.
|
List<TriggerKey> |
selectMisfiredTriggersInState(Connection conn,
String state,
long ts)
Get the names of all of the triggers in the given state that have
misfired - according to the given timestamp.
|
long |
selectNextFireTime(Connection conn)
Deprecated.
Does not account for misfires.
|
int |
selectNumCalendars(Connection conn)
Select the total number of calendars stored.
|
int |
selectNumJobs(Connection conn)
Select the total number of jobs stored.
|
int |
selectNumTriggers(Connection conn)
Select the total number of triggers stored.
|
int |
selectNumTriggersForJob(Connection conn,
JobKey jobKey)
Select the number of triggers associated with a given job.
|
Set<String> |
selectPausedTriggerGroups(Connection conn) |
List<SchedulerStateRecord> |
selectSchedulerStateRecords(Connection conn,
String instanceId)
A List of all current
SchedulerStateRecords. |
OperableTrigger |
selectTrigger(Connection conn,
TriggerKey triggerKey)
Select a trigger.
|
Key<?> |
selectTriggerForFireTime(Connection conn,
long fireTime)
Select the trigger that will be fired at the given fire time.
|
List<String> |
selectTriggerGroups(Connection conn)
Select all of the trigger group names that are stored.
|
List<String> |
selectTriggerGroups(Connection conn,
GroupMatcher<TriggerKey> matcher) |
JobDataMap |
selectTriggerJobDataMap(Connection conn,
String triggerName,
String groupName)
Select a trigger's JobDataMap.
|
List<TriggerKey> |
selectTriggerKeysForJob(Connection conn,
JobKey jobKey)
Get the names of all of the triggers associated with the given job.
|
List<OperableTrigger> |
selectTriggersForCalendar(Connection conn,
String calName)
Select the triggers for a calendar
|
List<OperableTrigger> |
selectTriggersForJob(Connection conn,
JobKey jobKey)
Select the triggers for a job
|
List<OperableTrigger> |
selectTriggersForRecoveringJobs(Connection conn)
Select all of the triggers for jobs that are requesting recovery.
|
Set<TriggerKey> |
selectTriggersInGroup(Connection conn,
GroupMatcher<TriggerKey> matcher)
Select all of the triggers contained in a given group.
|
List<TriggerKey> |
selectTriggersInState(Connection conn,
String state)
Select all of the triggers in a given state.
|
String |
selectTriggerState(Connection conn,
TriggerKey triggerKey)
Select a trigger' state value.
|
TriggerStatus |
selectTriggerStatus(Connection conn,
TriggerKey triggerKey)
Select a trigger' status (state & next fire time).
|
List<TriggerKey> |
selectTriggerToAcquire(Connection conn,
long noLaterThan,
long noEarlierThan)
Deprecated.
- This remained for compatibility reason. Use
selectTriggerToAcquire(Connection, long, long, int) instead. |
List<TriggerKey> |
selectTriggerToAcquire(Connection conn,
long noLaterThan,
long noEarlierThan,
int maxCount)
Select the next trigger which will fire to fire between the two given timestamps
in ascending order of fire time, and then descending by priority.
|
boolean |
triggerExists(Connection conn,
TriggerKey triggerKey)
Check whether or not a trigger exists.
|
int |
updateCalendar(Connection conn,
String calendarName,
Calendar calendar)
Update a calendar.
|
int |
updateFiredTrigger(Connection conn,
OperableTrigger trigger,
String state,
JobDetail jobDetail)
Update a fired trigger record.
|
int |
updateJobData(Connection conn,
JobDetail job)
Update the job data map for the given job.
|
int |
updateJobDetail(Connection conn,
JobDetail job)
Update the job detail record.
|
int |
updateSchedulerState(Connection conn,
String instanceId,
long checkInTime)
Update a scheduler-instance state record.
|
int |
updateTrigger(Connection conn,
OperableTrigger trigger,
String state,
JobDetail jobDetail)
Update the base trigger data.
|
int |
updateTriggerGroupStateFromOtherState(Connection conn,
GroupMatcher<TriggerKey> matcher,
String newState,
String oldState)
Update all of the triggers of the given group to the given new state, if
they are in the given old state.
|
int |
updateTriggerGroupStateFromOtherStates(Connection conn,
GroupMatcher<TriggerKey> matcher,
String newState,
String oldState1,
String oldState2,
String oldState3)
Update all triggers in the given group to the given new state, if they
are in one of the given old states.
|
int |
updateTriggerState(Connection conn,
TriggerKey triggerKey,
String state)
Update the state for a given trigger.
|
int |
updateTriggerStateFromOtherState(Connection conn,
TriggerKey triggerKey,
String newState,
String oldState)
Update the given trigger to the given new state, if it is in the given
old state.
|
int |
updateTriggerStateFromOtherStates(Connection conn,
TriggerKey triggerKey,
String newState,
String oldState1,
String oldState2,
String oldState3)
Update the given trigger to the given new state, if it is one of the
given old states.
|
int |
updateTriggerStatesForJob(Connection conn,
JobKey jobKey,
String state)
Update the states of all triggers associated with the given job.
|
int |
updateTriggerStatesForJobFromOtherState(Connection conn,
JobKey jobKey,
String state,
String oldState)
Update the states of any triggers associated with the given job, that
are the given current state.
|
int |
updateTriggerStatesFromOtherStates(Connection conn,
String newState,
String oldState1,
String oldState2)
Update all triggers having one of the two given states, to the given new
state.
|
void initialize(org.slf4j.Logger logger,
String tablePrefix,
String schedName,
String instanceId,
ClassLoadHelper classLoadHelper,
boolean useProperties,
String initString)
throws NoSuchDelegateException
initString - of the format: settingName=settingValue|otherSettingName=otherSettingValue|...NoSuchDelegateExceptionint updateTriggerStatesFromOtherStates(Connection conn, String newState, String oldState1, String oldState2) throws SQLException
Update all triggers having one of the two given states, to the given new state.
conn - the DB ConnectionnewState - the new state for the triggersoldState1 - the first old state to updateoldState2 - the second old state to updateSQLExceptionList<TriggerKey> selectMisfiredTriggers(Connection conn, long ts) throws SQLException
Get the names of all of the triggers that have misfired - according to the given timestamp.
conn - the DB ConnectionKey objectsSQLExceptionList<TriggerKey> selectMisfiredTriggersInState(Connection conn, String state, long ts) throws SQLException
Get the names of all of the triggers in the given state that have misfired - according to the given timestamp.
conn - the DB ConnectionKey objectsSQLExceptionboolean hasMisfiredTriggersInState(Connection conn, String state1, long ts, int count, List<TriggerKey> resultList) throws SQLException
Get the names of all of the triggers in the given states that have misfired - according to the given timestamp. No more than count will be returned.
conn - the DB Connectioncount - the most misfired triggers to return, negative for allresultList - Output parameter. A List of
Key objects. Must not be null.SQLExceptionint countMisfiredTriggersInState(Connection conn, String state1, long ts) throws SQLException
Get the number of triggers in the given state that have misfired - according to the given timestamp.
conn - the DB ConnectionSQLExceptionList<TriggerKey> selectMisfiredTriggersInGroupInState(Connection conn, String groupName, String state, long ts) throws SQLException
Get the names of all of the triggers in the given group and state that have misfired - according to the given timestamp.
conn - the DB ConnectionKey objectsSQLExceptionList<OperableTrigger> selectTriggersForRecoveringJobs(Connection conn) throws SQLException, IOException, ClassNotFoundException
Select all of the triggers for jobs that are requesting recovery. The
returned trigger objects will have unique "recoverXXX" trigger names and
will be in the
trigger group.
Scheduler.DEFAULT_RECOVERY_GROUP
In order to preserve the ordering of the triggers, the fire time will be
set from the COL_FIRED_TIME column in the TABLE_FIRED_TRIGGERS
table. The caller is responsible for calling computeFirstFireTime
on each returned trigger. It is also up to the caller to insert the
returned triggers to ensure that they are fired.
conn - the DB ConnectionTrigger objectsSQLExceptionIOExceptionClassNotFoundExceptionint deleteFiredTriggers(Connection conn) throws SQLException
Delete all fired triggers.
conn - the DB ConnectionSQLExceptionint deleteFiredTriggers(Connection conn, String instanceId) throws SQLException
Delete all fired triggers of the given instance.
conn - the DB ConnectionSQLExceptionint insertJobDetail(Connection conn, JobDetail job) throws IOException, SQLException
Insert the job detail record.
conn - the DB Connectionjob - the job to insertIOException - if there were problems serializing the JobDataMapSQLExceptionint updateJobDetail(Connection conn, JobDetail job) throws IOException, SQLException
Update the job detail record.
conn - the DB Connectionjob - the job to updateIOException - if there were problems serializing the JobDataMapSQLExceptionList<TriggerKey> selectTriggerKeysForJob(Connection conn, JobKey jobKey) throws SQLException
Get the names of all of the triggers associated with the given job.
conn - the DB ConnectionKey objectsSQLExceptionint deleteJobDetail(Connection conn, JobKey jobKey) throws SQLException
Delete the job detail record for the given job.
conn - the DB ConnectionSQLExceptionboolean isJobNonConcurrent(Connection conn, JobKey jobKey) throws SQLException
Check whether or not the given job disallows concurrent execution.
conn - the DB ConnectionSQLExceptionboolean jobExists(Connection conn, JobKey jobKey) throws SQLException
Check whether or not the given job exists.
conn - the DB ConnectionSQLExceptionint updateJobData(Connection conn, JobDetail job) throws IOException, SQLException
Update the job data map for the given job.
conn - the DB Connectionjob - the job to updateIOException - if there were problems serializing the JobDataMapSQLExceptionJobDetail selectJobDetail(Connection conn, JobKey jobKey, ClassLoadHelper loadHelper) throws ClassNotFoundException, IOException, SQLException
Select the JobDetail object for a given job name / group name.
conn - the DB ConnectionClassNotFoundException - if a class found during deserialization cannot be found or if
the job class could not be foundIOException - if deserialization causes an errorSQLExceptionint selectNumJobs(Connection conn) throws SQLException
Select the total number of jobs stored.
conn - the DB ConnectionSQLExceptionList<String> selectJobGroups(Connection conn) throws SQLException
Select all of the job group names that are stored.
conn - the DB ConnectionString group namesSQLExceptionSet<JobKey> selectJobsInGroup(Connection conn, GroupMatcher<JobKey> matcher) throws SQLException
Select all of the jobs contained in a given group.
conn - the DB Connectionmatcher - the group matcher to evaluate against the known jobsString job namesSQLExceptionint insertTrigger(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException
Insert the base trigger data.
conn - the DB Connectiontrigger - the trigger to insertstate - the state that the trigger should be stored inSQLExceptionIOExceptionint updateTrigger(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException, IOException
Update the base trigger data.
conn - the DB Connectiontrigger - the trigger to insertstate - the state that the trigger should be stored inSQLExceptionIOExceptionboolean triggerExists(Connection conn, TriggerKey triggerKey) throws SQLException
Check whether or not a trigger exists.
conn - the DB ConnectionSQLExceptionint updateTriggerState(Connection conn, TriggerKey triggerKey, String state) throws SQLException
Update the state for a given trigger.
conn - the DB Connectionstate - the new state for the triggerSQLExceptionint updateTriggerStateFromOtherState(Connection conn, TriggerKey triggerKey, String newState, String oldState) throws SQLException
Update the given trigger to the given new state, if it is in the given old state.
conn - the DB connectionnewState - the new state for the triggeroldState - the old state the trigger must be inSQLExceptionint updateTriggerStateFromOtherStates(Connection conn, TriggerKey triggerKey, String newState, String oldState1, String oldState2, String oldState3) throws SQLException
Update the given trigger to the given new state, if it is one of the given old states.
conn - the DB connectionnewState - the new state for the triggeroldState1 - one of the old state the trigger must be inoldState2 - one of the old state the trigger must be inoldState3 - one of the old state the trigger must be inSQLExceptionint updateTriggerGroupStateFromOtherStates(Connection conn, GroupMatcher<TriggerKey> matcher, String newState, String oldState1, String oldState2, String oldState3) throws SQLException
Update all triggers in the given group to the given new state, if they are in one of the given old states.
conn - the DB connectionmatcher - the group matcher to evaluate against the known triggersnewState - the new state for the triggeroldState1 - one of the old state the trigger must be inoldState2 - one of the old state the trigger must be inoldState3 - one of the old state the trigger must be inSQLExceptionint updateTriggerGroupStateFromOtherState(Connection conn, GroupMatcher<TriggerKey> matcher, String newState, String oldState) throws SQLException
Update all of the triggers of the given group to the given new state, if they are in the given old state.
conn - the DB connectionmatcher - the matcher to evaluate against the known triggersnewState - the new state for the trigger groupoldState - the old state the triggers must be inSQLExceptionint updateTriggerStatesForJob(Connection conn, JobKey jobKey, String state) throws SQLException
Update the states of all triggers associated with the given job.
conn - the DB Connectionstate - the new state for the triggersSQLExceptionint updateTriggerStatesForJobFromOtherState(Connection conn, JobKey jobKey, String state, String oldState) throws SQLException
Update the states of any triggers associated with the given job, that are the given current state.
conn - the DB Connectionstate - the new state for the triggersoldState - the old state of the triggersSQLExceptionint deleteTrigger(Connection conn, TriggerKey triggerKey) throws SQLException
Delete the base trigger data for a trigger.
conn - the DB ConnectionSQLExceptionint selectNumTriggersForJob(Connection conn, JobKey jobKey) throws SQLException
Select the number of triggers associated with a given job.
conn - the DB ConnectionSQLExceptionJobDetail selectJobForTrigger(Connection conn, ClassLoadHelper loadHelper, TriggerKey triggerKey) throws ClassNotFoundException, SQLException
Select the job to which the trigger is associated.
conn - the DB ConnectionJobDetail object
associated with the given triggerClassNotFoundExceptionSQLExceptionJobDetail selectJobForTrigger(Connection conn, ClassLoadHelper loadHelper, TriggerKey triggerKey, boolean loadJobClass) throws ClassNotFoundException, SQLException
Select the job to which the trigger is associated. Allow option to load actual job class or not. When case of remove, we do not need to load the class, which in many cases, it's no longer exists.
ClassNotFoundExceptionSQLExceptionList<OperableTrigger> selectTriggersForJob(Connection conn, JobKey jobKey) throws SQLException, ClassNotFoundException, IOException, JobPersistenceException
Select the triggers for a job
conn - the DB Connection(@link org.quartz.Trigger) objects
associated with a given job.SQLExceptionJobPersistenceExceptionClassNotFoundExceptionIOExceptionList<OperableTrigger> selectTriggersForCalendar(Connection conn, String calName) throws SQLException, ClassNotFoundException, IOException, JobPersistenceException
Select the triggers for a calendar
conn - the DB ConnectioncalName - the name of the calendar(@link org.quartz.Trigger) objects
associated with the given calendar.SQLExceptionJobPersistenceExceptionClassNotFoundExceptionIOExceptionOperableTrigger selectTrigger(Connection conn, TriggerKey triggerKey) throws SQLException, ClassNotFoundException, IOException, JobPersistenceException
Select a trigger.
conn - the DB ConnectionTrigger objectJobPersistenceExceptionSQLExceptionClassNotFoundExceptionIOExceptionJobDataMap selectTriggerJobDataMap(Connection conn, String triggerName, String groupName) throws SQLException, ClassNotFoundException, IOException
Select a trigger's JobDataMap.
conn - the DB ConnectiontriggerName - the name of the triggergroupName - the group containing the triggerJobDataMap of the Trigger,
never null, but possibly empty.SQLExceptionClassNotFoundExceptionIOExceptionString selectTriggerState(Connection conn, TriggerKey triggerKey) throws SQLException
Select a trigger' state value.
conn - the DB ConnectionTrigger objectSQLExceptionTriggerStatus selectTriggerStatus(Connection conn, TriggerKey triggerKey) throws SQLException
Select a trigger' status (state & next fire time).
conn - the DB ConnectionTriggerStatus object, or nullSQLExceptionint selectNumTriggers(Connection conn) throws SQLException
Select the total number of triggers stored.
conn - the DB ConnectionSQLExceptionList<String> selectTriggerGroups(Connection conn) throws SQLException
Select all of the trigger group names that are stored.
conn - the DB ConnectionString group namesSQLExceptionList<String> selectTriggerGroups(Connection conn, GroupMatcher<TriggerKey> matcher) throws SQLException
SQLExceptionSet<TriggerKey> selectTriggersInGroup(Connection conn, GroupMatcher<TriggerKey> matcher) throws SQLException
Select all of the triggers contained in a given group.
conn - the DB Connectionmatcher - to evaluate against known triggersTriggerKeysSQLExceptionList<TriggerKey> selectTriggersInState(Connection conn, String state) throws SQLException
Select all of the triggers in a given state.
conn - the DB Connectionstate - the state the triggers must be inKey sSQLExceptionint insertPausedTriggerGroup(Connection conn, String groupName) throws SQLException
SQLExceptionint deletePausedTriggerGroup(Connection conn, String groupName) throws SQLException
SQLExceptionint deletePausedTriggerGroup(Connection conn, GroupMatcher<TriggerKey> matcher) throws SQLException
SQLExceptionint deleteAllPausedTriggerGroups(Connection conn) throws SQLException
SQLExceptionboolean isTriggerGroupPaused(Connection conn, String groupName) throws SQLException
SQLExceptionSet<String> selectPausedTriggerGroups(Connection conn) throws SQLException
SQLExceptionboolean isExistingTriggerGroup(Connection conn, String groupName) throws SQLException
SQLExceptionint insertCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException
Insert a new calendar.
conn - the DB ConnectioncalendarName - the name for the new calendarcalendar - the calendarIOException - if there were problems serializing the calendarSQLExceptionint updateCalendar(Connection conn, String calendarName, Calendar calendar) throws IOException, SQLException
Update a calendar.
conn - the DB ConnectioncalendarName - the name for the new calendarcalendar - the calendarIOException - if there were problems serializing the calendarSQLExceptionboolean calendarExists(Connection conn, String calendarName) throws SQLException
Check whether or not a calendar exists.
conn - the DB ConnectioncalendarName - the name of the calendarSQLExceptionCalendar selectCalendar(Connection conn, String calendarName) throws ClassNotFoundException, IOException, SQLException
Select a calendar.
conn - the DB ConnectioncalendarName - the name of the calendarClassNotFoundException - if a class found during deserialization cannot be found be
foundIOException - if there were problems deserializing the calendarSQLExceptionboolean calendarIsReferenced(Connection conn, String calendarName) throws SQLException
Check whether or not a calendar is referenced by any triggers.
conn - the DB ConnectioncalendarName - the name of the calendarSQLExceptionint deleteCalendar(Connection conn, String calendarName) throws SQLException
Delete a calendar.
conn - the DB ConnectioncalendarName - the name of the triggerSQLExceptionint selectNumCalendars(Connection conn) throws SQLException
Select the total number of calendars stored.
conn - the DB ConnectionSQLExceptionList<String> selectCalendars(Connection conn) throws SQLException
Select all of the stored calendars.
conn - the DB ConnectionString calendar namesSQLExceptionlong selectNextFireTime(Connection conn) throws SQLException
Select the next time that a trigger will be fired.
conn - the DB ConnectionSQLExceptionKey<?> selectTriggerForFireTime(Connection conn, long fireTime) throws SQLException
Select the trigger that will be fired at the given fire time.
conn - the DB ConnectionfireTime - the time that the trigger will be firedKey representing the
trigger that will be fired at the given fire time, or null if no
trigger will be fired at that timeSQLExceptionList<TriggerKey> selectTriggerToAcquire(Connection conn, long noLaterThan, long noEarlierThan) throws SQLException
selectTriggerToAcquire(Connection, long, long, int) instead.Select the next trigger which will fire to fire between the two given timestamps in ascending order of fire time, and then descending by priority.
conn - the DB ConnectionnoLaterThan - highest value of getNextFireTime() of the triggers (exclusive)noEarlierThan - highest value of getNextFireTime() of the triggers (inclusive)SQLExceptionList<TriggerKey> selectTriggerToAcquire(Connection conn, long noLaterThan, long noEarlierThan, int maxCount) throws SQLException
Select the next trigger which will fire to fire between the two given timestamps in ascending order of fire time, and then descending by priority.
conn - the DB ConnectionnoLaterThan - highest value of getNextFireTime() of the triggers (exclusive)noEarlierThan - highest value of getNextFireTime() of the triggers (inclusive)maxCount - maximum number of trigger keys allow to acquired in the returning list.SQLExceptionint insertFiredTrigger(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException
Insert a fired trigger.
conn - the DB Connectiontrigger - the triggerstate - the state that the trigger should be stored inSQLExceptionint updateFiredTrigger(Connection conn, OperableTrigger trigger, String state, JobDetail jobDetail) throws SQLException
Update a fired trigger record. Will update the fields "firing instance", "fire time", and "state".
conn - the DB Connectiontrigger - the triggerstate - the state that the trigger should be stored inSQLExceptionList<FiredTriggerRecord> selectFiredTriggerRecords(Connection conn, String triggerName, String groupName) throws SQLException
Select the states of all fired-trigger records for a given trigger, or
trigger group if trigger name is null.
SQLExceptionList<FiredTriggerRecord> selectFiredTriggerRecordsByJob(Connection conn, String jobName, String groupName) throws SQLException
Select the states of all fired-trigger records for a given job, or job
group if job name is null.
SQLExceptionList<FiredTriggerRecord> selectInstancesFiredTriggerRecords(Connection conn, String instanceName) throws SQLException
Select the states of all fired-trigger records for a given scheduler instance.
SQLExceptionSet<String> selectFiredTriggerInstanceNames(Connection conn) throws SQLException
Select the distinct instance names of all fired-trigger records.
This is useful when trying to identify orphaned fired triggers (a fired trigger without a scheduler state record.)
SQLExceptionint deleteFiredTrigger(Connection conn, String entryId) throws SQLException
Delete a fired trigger.
conn - the DB ConnectionentryId - the fired trigger entry to deleteSQLExceptionint selectJobExecutionCount(Connection conn, JobKey jobKey) throws SQLException
Get the number instances of the identified job currently executing.
conn - the DB ConnectionSQLExceptionint insertSchedulerState(Connection conn, String instanceId, long checkInTime, long interval) throws SQLException
Insert a scheduler-instance state record.
conn - the DB ConnectionSQLExceptionint deleteSchedulerState(Connection conn, String instanceId) throws SQLException
Delete a scheduler-instance state record.
conn - the DB ConnectionSQLExceptionint updateSchedulerState(Connection conn, String instanceId, long checkInTime) throws SQLException
Update a scheduler-instance state record.
conn - the DB ConnectionSQLExceptionList<SchedulerStateRecord> selectSchedulerStateRecords(Connection conn, String instanceId) throws SQLException
A List of all current SchedulerStateRecords.
If instanceId is not null, then only the record for the identified instance will be returned.
conn - the DB ConnectionSQLExceptionvoid clearData(Connection conn) throws SQLException
JobPersistenceExceptionSQLExceptionCopyright 2001-2019, Terracotta, Inc.