public class RedisStorage extends AbstractRedisStorage<redis.clients.jedis.Jedis>
CALENDAR_CLASS, CALENDAR_JSON, lockTimeout, lockValue, mapper, misfireThreshold, redisSchema, schedulerInstanceId, signaler, TRIGGER_CLASS, TRIGGER_LOCK_TIMEOUT, TRIGGER_NEXT_FIRE_TIME| Constructor and Description |
|---|
RedisStorage(RedisJobStoreSchema redisSchema,
com.fasterxml.jackson.databind.ObjectMapper mapper,
org.quartz.spi.SchedulerSignaler signaler,
String schedulerInstanceId,
int lockTimeout) |
| Modifier and Type | Method and Description |
|---|---|
Set<org.quartz.JobKey> |
getJobKeys(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher,
redis.clients.jedis.Jedis jedis)
Get the keys of all of the
s that have the given group name. |
Set<org.quartz.TriggerKey> |
getTriggerKeys(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher,
redis.clients.jedis.Jedis jedis)
Get the names of all of the
s that have the given group name. |
org.quartz.Trigger.TriggerState |
getTriggerState(org.quartz.TriggerKey triggerKey,
redis.clients.jedis.Jedis jedis)
Get the current state of the identified
. |
Collection<String> |
pauseJobs(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> groupMatcher,
redis.clients.jedis.Jedis jedis)
Pause all of the
in the given group - by pausing all of their
Triggers. |
void |
pauseTrigger(org.quartz.TriggerKey triggerKey,
redis.clients.jedis.Jedis jedis)
Pause the trigger with the given key
|
Collection<String> |
pauseTriggers(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher,
redis.clients.jedis.Jedis jedis)
Pause all of the
in the given group. |
boolean |
removeCalendar(String calendarName,
redis.clients.jedis.Jedis jedis)
Remove (delete) the
with the given name. |
boolean |
removeJob(org.quartz.JobKey jobKey,
redis.clients.jedis.Jedis jedis)
Remove the given job from Redis
|
protected boolean |
removeTrigger(org.quartz.TriggerKey triggerKey,
boolean removeNonDurableJob,
redis.clients.jedis.Jedis jedis)
Remove (delete) the
with the given key. |
Collection<String> |
resumeJobs(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher,
redis.clients.jedis.Jedis jedis)
Resume (un-pause) all of the
in the given group. |
void |
resumeTrigger(org.quartz.TriggerKey triggerKey,
redis.clients.jedis.Jedis jedis)
Resume (un-pause) a
Trigger |
Collection<String> |
resumeTriggers(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher,
redis.clients.jedis.Jedis jedis)
Resume (un-pause) all of the
in the given group. |
void |
storeCalendar(String name,
org.quartz.Calendar calendar,
boolean replaceExisting,
boolean updateTriggers,
redis.clients.jedis.Jedis jedis)
Store a
Calendar |
void |
storeJob(org.quartz.JobDetail jobDetail,
boolean replaceExisting,
redis.clients.jedis.Jedis jedis)
Store a job in Redis
|
void |
storeTrigger(org.quartz.spi.OperableTrigger trigger,
boolean replaceExisting,
redis.clients.jedis.Jedis jedis)
Store a trigger in redis
|
void |
triggeredJobComplete(org.quartz.spi.OperableTrigger trigger,
org.quartz.JobDetail jobDetail,
org.quartz.Trigger.CompletedExecutionInstruction triggerInstCode,
redis.clients.jedis.Jedis jedis)
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
in the given JobDetail should be updated if the Job
is stateful. |
List<org.quartz.spi.TriggerFiredResult> |
triggersFired(List<org.quartz.spi.OperableTrigger> triggers,
redis.clients.jedis.Jedis jedis)
Inform the
JobStore that the scheduler is now firing the
given Trigger (executing its associated Job),
that it had previously acquired (reserved). |
boolean |
unsetTriggerState(String triggerHashKey,
redis.clients.jedis.Jedis jedis)
Unsets the state of the given trigger key by removing the trigger from all trigger state sets.
|
acquireNextTriggers, applyMisfire, checkExists, checkExists, clearAllSchedulingData, getCalendarNames, getJobGroupNames, getLastTriggersReleaseTime, getNumberOfCalendars, getNumberOfJobs, getNumberOfTriggers, getPausedTriggerGroups, getStringDataMap, getTriggerGroupNames, getTriggersForJob, isJobConcurrentExecutionDisallowed, isNullOrEmpty, isPersistJobDataAfterExecution, lock, lockTrigger, pauseAll, pauseJob, randomInt, releaseAcquiredTrigger, releaseOrphanedTriggers, releaseTriggersCron, removeTrigger, replaceTrigger, resumeAll, resumeJob, retrieveCalendar, retrieveJob, retrieveTrigger, setMisfireThreshold, settLastTriggerReleaseTime, setTriggerState, unlock, waitForLockpublic RedisStorage(RedisJobStoreSchema redisSchema, com.fasterxml.jackson.databind.ObjectMapper mapper, org.quartz.spi.SchedulerSignaler signaler, String schedulerInstanceId, int lockTimeout)
public boolean removeJob(org.quartz.JobKey jobKey,
redis.clients.jedis.Jedis jedis)
throws org.quartz.JobPersistenceException
removeJob in class AbstractRedisStorage<redis.clients.jedis.Jedis>jobKey - the job to be removedjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionprotected boolean removeTrigger(org.quartz.TriggerKey triggerKey,
boolean removeNonDurableJob,
redis.clients.jedis.Jedis jedis)
throws org.quartz.JobPersistenceException,
ClassNotFoundException
Trigger with the given key.removeTrigger in class AbstractRedisStorage<redis.clients.jedis.Jedis>triggerKey - the key of the trigger to be removedremoveNonDurableJob - if true, the job associated with the given trigger will be removed if it is non-durable
and has no other triggersjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionClassNotFoundExceptionpublic void storeJob(org.quartz.JobDetail jobDetail,
boolean replaceExisting,
redis.clients.jedis.Jedis jedis)
throws org.quartz.ObjectAlreadyExistsException
storeJob in class AbstractRedisStorage<redis.clients.jedis.Jedis>jobDetail - the JobDetail object to be storedreplaceExisting - if true, any existing job with the same group and name as the given job will be overwrittenjedis - a thread-safe Redis connectionorg.quartz.ObjectAlreadyExistsExceptionpublic void storeTrigger(org.quartz.spi.OperableTrigger trigger,
boolean replaceExisting,
redis.clients.jedis.Jedis jedis)
throws org.quartz.JobPersistenceException
storeTrigger in class AbstractRedisStorage<redis.clients.jedis.Jedis>trigger - the trigger to be storedreplaceExisting - true if an existing trigger with the same identity should be replacedjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionorg.quartz.ObjectAlreadyExistsExceptionpublic boolean unsetTriggerState(String triggerHashKey, redis.clients.jedis.Jedis jedis) throws org.quartz.JobPersistenceException
unsetTriggerState in class AbstractRedisStorage<redis.clients.jedis.Jedis>triggerHashKey - the redis key of the desired trigger hashjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceException - if the unset operation failedpublic void storeCalendar(String name, org.quartz.Calendar calendar, boolean replaceExisting, boolean updateTriggers, redis.clients.jedis.Jedis jedis) throws org.quartz.JobPersistenceException
CalendarstoreCalendar in class AbstractRedisStorage<redis.clients.jedis.Jedis>name - the name of the calendarcalendar - the calendar object to be storedreplaceExisting - if true, any existing calendar with the same name will be overwrittenupdateTriggers - if true, any existing triggers associated with the calendar will be updatedjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionpublic boolean removeCalendar(String calendarName, redis.clients.jedis.Jedis jedis) throws org.quartz.JobPersistenceException
Calendar with the given name.removeCalendar in class AbstractRedisStorage<redis.clients.jedis.Jedis>calendarName - the name of the calendar to be removedjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionpublic Set<org.quartz.JobKey> getJobKeys(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher, redis.clients.jedis.Jedis jedis)
Job s that have the given group name.getJobKeys in class AbstractRedisStorage<redis.clients.jedis.Jedis>matcher - the matcher with which to compare group namesjedis - a thread-safe Redis connectionpublic Set<org.quartz.TriggerKey> getTriggerKeys(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher, redis.clients.jedis.Jedis jedis)
Trigger s that have the given group name.getTriggerKeys in class AbstractRedisStorage<redis.clients.jedis.Jedis>matcher - the matcher with which to compare group namesjedis - a thread-safe Redis connectionpublic org.quartz.Trigger.TriggerState getTriggerState(org.quartz.TriggerKey triggerKey,
redis.clients.jedis.Jedis jedis)
Trigger.getTriggerState in class AbstractRedisStorage<redis.clients.jedis.Jedis>triggerKey - the key of the desired triggerjedis - a thread-safe Redis connectionpublic void pauseTrigger(org.quartz.TriggerKey triggerKey,
redis.clients.jedis.Jedis jedis)
throws org.quartz.JobPersistenceException
pauseTrigger in class AbstractRedisStorage<redis.clients.jedis.Jedis>triggerKey - the key of the trigger to be pausedjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceException - if the desired trigger does not existpublic Collection<String> pauseTriggers(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher, redis.clients.jedis.Jedis jedis) throws org.quartz.JobPersistenceException
Triggers in the given group.pauseTriggers in class AbstractRedisStorage<redis.clients.jedis.Jedis>matcher - matcher for the trigger groups to be pausedjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionpublic Collection<String> pauseJobs(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> groupMatcher, redis.clients.jedis.Jedis jedis) throws org.quartz.JobPersistenceException
Jobs in the given group - by pausing all of their
Triggers.pauseJobs in class AbstractRedisStorage<redis.clients.jedis.Jedis>groupMatcher - the mather which will determine which job group should be pausedjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionpublic void resumeTrigger(org.quartz.TriggerKey triggerKey,
redis.clients.jedis.Jedis jedis)
throws org.quartz.JobPersistenceException
TriggerresumeTrigger in class AbstractRedisStorage<redis.clients.jedis.Jedis>triggerKey - the key of the trigger to be resumedjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionpublic Collection<String> resumeTriggers(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher, redis.clients.jedis.Jedis jedis) throws org.quartz.JobPersistenceException
Triggers in the given group.resumeTriggers in class AbstractRedisStorage<redis.clients.jedis.Jedis>matcher - matcher for the trigger groups to be resumedjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionpublic Collection<String> resumeJobs(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher, redis.clients.jedis.Jedis jedis) throws org.quartz.JobPersistenceException
Jobs in the given group.resumeJobs in class AbstractRedisStorage<redis.clients.jedis.Jedis>matcher - the matcher with which to compare job group namesjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionpublic List<org.quartz.spi.TriggerFiredResult> triggersFired(List<org.quartz.spi.OperableTrigger> triggers, redis.clients.jedis.Jedis jedis) throws org.quartz.JobPersistenceException, ClassNotFoundException
JobStore that the scheduler is now firing the
given Trigger (executing its associated Job),
that it had previously acquired (reserved).triggersFired in class AbstractRedisStorage<redis.clients.jedis.Jedis>triggers - a list of triggersjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionClassNotFoundExceptionpublic void triggeredJobComplete(org.quartz.spi.OperableTrigger trigger,
org.quartz.JobDetail jobDetail,
org.quartz.Trigger.CompletedExecutionInstruction triggerInstCode,
redis.clients.jedis.Jedis jedis)
throws org.quartz.JobPersistenceException,
ClassNotFoundException
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 JobDataMap
in the given JobDetail should be updated if the Job
is stateful.triggeredJobComplete in class AbstractRedisStorage<redis.clients.jedis.Jedis>trigger - the trigger which was completedjobDetail - the job which was completedtriggerInstCode - the status of the completed jobjedis - a thread-safe Redis connectionorg.quartz.JobPersistenceExceptionClassNotFoundExceptionCopyright © 2018. All rights reserved.