public class DefaultScheduler extends Object implements org.quartz.Scheduler
Scheduler
that create Trigger
s from TriggerFactory
.
Scheduler has two constructors:
DefaultScheduler(String, JobExecuteTypeInCluster, Properties)
- create scheduler that store
information about triggers and jobs into memory.
DefaultScheduler(String, JobExecuteTypeInCluster, DataSource, Properties)
- create scheduler
that store information about triggers and jobs into DataSource
.
TriggerFactory
,
QuartzJob
,
QuartzSimpleTrigger
,
QuartzCronTrigger
,
QuartzSchedulerLifecycle
,
AnnotationMethodTriggerFactory
DEFAULT_FAIL_OVER_GROUP, DEFAULT_GROUP, DEFAULT_RECOVERY_GROUP, FAILED_JOB_ORIGINAL_TRIGGER_FIRETIME_IN_MILLISECONDS, FAILED_JOB_ORIGINAL_TRIGGER_GROUP, FAILED_JOB_ORIGINAL_TRIGGER_NAME, FAILED_JOB_ORIGINAL_TRIGGER_SCHEDULED_FIRETIME_IN_MILLISECONDS
Constructor and Description |
---|
DefaultScheduler(String schedulerName,
JobExecuteTypeInCluster jobExecuteType,
DataSource dataSource,
Properties quartzConfProperties)
New instance that save information about jobs and triggers into data source.
|
DefaultScheduler(String schedulerName,
JobExecuteTypeInCluster jobExecuteType,
Properties quartzConfProperties)
New instance that save information about jobs and triggers into memory.ø
|
Modifier and Type | Method and Description |
---|---|
void |
addCalendar(String calName,
org.quartz.Calendar calendar,
boolean replace,
boolean updateTriggers) |
void |
addJob(org.quartz.JobDetail jobDetail,
boolean replace) |
void |
addJob(org.quartz.JobDetail jobDetail,
boolean replace,
boolean storeNonDurableWhileAwaitingScheduling) |
boolean |
checkExists(org.quartz.JobKey jobKey) |
boolean |
checkExists(org.quartz.TriggerKey triggerKey) |
void |
clear() |
protected org.quartz.Scheduler |
createScheduler()
Create new instance of
Scheduler . |
boolean |
deleteCalendar(String calName) |
boolean |
deleteJob(org.quartz.JobKey jobKey) |
boolean |
deleteJobs(List<org.quartz.JobKey> jobKeys) |
org.quartz.Calendar |
getCalendar(String calName) |
List<String> |
getCalendarNames() |
org.quartz.SchedulerContext |
getContext() |
List<org.quartz.JobExecutionContext> |
getCurrentlyExecutingJobs() |
org.quartz.JobDetail |
getJobDetail(org.quartz.JobKey jobKey) |
JobExecuteTypeInCluster |
getJobExecuteType()
Gets cluster execute type.
|
List<String> |
getJobGroupNames() |
Set<org.quartz.JobKey> |
getJobKeys(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher) |
org.quartz.ListenerManager |
getListenerManager() |
org.quartz.SchedulerMetaData |
getMetaData() |
Set<String> |
getPausedTriggerGroups() |
protected org.quartz.Scheduler |
getScheduler()
Gets new or existing instance of
Scheduler . |
String |
getSchedulerInstanceId() |
String |
getSchedulerName() |
org.quartz.Trigger |
getTrigger(org.quartz.TriggerKey triggerKey) |
List<String> |
getTriggerGroupNames() |
Set<org.quartz.TriggerKey> |
getTriggerKeys(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher) |
List<? extends org.quartz.Trigger> |
getTriggersOfJob(org.quartz.JobKey jobKey) |
org.quartz.Trigger.TriggerState |
getTriggerState(org.quartz.TriggerKey triggerKey) |
boolean |
interrupt(org.quartz.JobKey jobKey) |
boolean |
interrupt(String fireInstanceId) |
boolean |
isInStandbyMode() |
boolean |
isShutdown() |
boolean |
isStarted() |
void |
pauseAll() |
void |
pauseJob(org.quartz.JobKey jobKey) |
void |
pauseJobs(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher) |
void |
pauseTrigger(org.quartz.TriggerKey triggerKey) |
void |
pauseTriggers(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher) |
Date |
rescheduleJob(org.quartz.TriggerKey triggerKey,
org.quartz.Trigger newTrigger) |
void |
resumeAll() |
void |
resumeJob(org.quartz.JobKey jobKey) |
void |
resumeJobs(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher) |
void |
resumeTrigger(org.quartz.TriggerKey triggerKey) |
void |
resumeTriggers(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher) |
void |
scheduleJob(org.quartz.JobDetail jobDetail,
Set<? extends org.quartz.Trigger> triggersForJob,
boolean replace) |
Date |
scheduleJob(org.quartz.JobDetail jobDetail,
org.quartz.Trigger trigger) |
Date |
scheduleJob(org.quartz.Trigger trigger) |
void |
scheduleJobs(Map<org.quartz.JobDetail,Set<? extends org.quartz.Trigger>> triggersAndJobs,
boolean replace) |
void |
setJobFactory(org.quartz.spi.JobFactory factory) |
void |
shutdown() |
void |
shutdown(boolean waitForJobsToComplete) |
void |
standby() |
void |
start() |
void |
startDelayed(int seconds) |
void |
triggerJob(org.quartz.JobKey jobKey) |
void |
triggerJob(org.quartz.JobKey jobKey,
org.quartz.JobDataMap data) |
boolean |
unscheduleJob(org.quartz.TriggerKey triggerKey) |
boolean |
unscheduleJobs(List<org.quartz.TriggerKey> triggerKeys) |
public DefaultScheduler(String schedulerName, JobExecuteTypeInCluster jobExecuteType, @Nullable Properties quartzConfProperties)
schedulerName
- name of schedulerjobExecuteType
- execute type jobs in cluster
(TriggerFactory.createTriggers(JobExecuteTypeInCluster)
)quartzConfProperties
- quartz configurationpublic DefaultScheduler(String schedulerName, JobExecuteTypeInCluster jobExecuteType, DataSource dataSource, @Nullable Properties quartzConfProperties)
schedulerName
- name of schedulerjobExecuteType
- execute type jobs in cluster
(TriggerFactory.createTriggers(JobExecuteTypeInCluster)
)dataSource
- data source in which will be save information about jobs and triggersquartzConfProperties
- quartz configurationprotected org.quartz.Scheduler createScheduler()
Scheduler
.protected org.quartz.Scheduler getScheduler()
Scheduler
.public String getSchedulerName() throws org.quartz.SchedulerException
getSchedulerName
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public String getSchedulerInstanceId() throws org.quartz.SchedulerException
getSchedulerInstanceId
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public org.quartz.SchedulerContext getContext() throws org.quartz.SchedulerException
getContext
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void start() throws org.quartz.SchedulerException
start
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void startDelayed(int seconds) throws org.quartz.SchedulerException
startDelayed
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean isStarted() throws org.quartz.SchedulerException
isStarted
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void standby() throws org.quartz.SchedulerException
standby
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean isInStandbyMode() throws org.quartz.SchedulerException
isInStandbyMode
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void shutdown() throws org.quartz.SchedulerException
shutdown
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void shutdown(boolean waitForJobsToComplete) throws org.quartz.SchedulerException
shutdown
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean isShutdown() throws org.quartz.SchedulerException
isShutdown
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public org.quartz.SchedulerMetaData getMetaData() throws org.quartz.SchedulerException
getMetaData
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public List<org.quartz.JobExecutionContext> getCurrentlyExecutingJobs() throws org.quartz.SchedulerException
getCurrentlyExecutingJobs
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void setJobFactory(org.quartz.spi.JobFactory factory) throws org.quartz.SchedulerException
setJobFactory
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public org.quartz.ListenerManager getListenerManager() throws org.quartz.SchedulerException
getListenerManager
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public Date scheduleJob(org.quartz.JobDetail jobDetail, org.quartz.Trigger trigger) throws org.quartz.SchedulerException
scheduleJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public Date scheduleJob(org.quartz.Trigger trigger) throws org.quartz.SchedulerException
scheduleJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void scheduleJobs(Map<org.quartz.JobDetail,Set<? extends org.quartz.Trigger>> triggersAndJobs, boolean replace) throws org.quartz.SchedulerException
scheduleJobs
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void scheduleJob(org.quartz.JobDetail jobDetail, Set<? extends org.quartz.Trigger> triggersForJob, boolean replace) throws org.quartz.SchedulerException
scheduleJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean unscheduleJob(org.quartz.TriggerKey triggerKey) throws org.quartz.SchedulerException
unscheduleJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean unscheduleJobs(List<org.quartz.TriggerKey> triggerKeys) throws org.quartz.SchedulerException
unscheduleJobs
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public Date rescheduleJob(org.quartz.TriggerKey triggerKey, org.quartz.Trigger newTrigger) throws org.quartz.SchedulerException
rescheduleJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void addJob(org.quartz.JobDetail jobDetail, boolean replace) throws org.quartz.SchedulerException
addJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void addJob(org.quartz.JobDetail jobDetail, boolean replace, boolean storeNonDurableWhileAwaitingScheduling) throws org.quartz.SchedulerException
addJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean deleteJob(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
deleteJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean deleteJobs(List<org.quartz.JobKey> jobKeys) throws org.quartz.SchedulerException
deleteJobs
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void triggerJob(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
triggerJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void triggerJob(org.quartz.JobKey jobKey, org.quartz.JobDataMap data) throws org.quartz.SchedulerException
triggerJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void pauseJob(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
pauseJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void pauseJobs(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher) throws org.quartz.SchedulerException
pauseJobs
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void pauseTrigger(org.quartz.TriggerKey triggerKey) throws org.quartz.SchedulerException
pauseTrigger
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void pauseTriggers(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher) throws org.quartz.SchedulerException
pauseTriggers
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void resumeJob(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
resumeJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void resumeJobs(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher) throws org.quartz.SchedulerException
resumeJobs
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void resumeTrigger(org.quartz.TriggerKey triggerKey) throws org.quartz.SchedulerException
resumeTrigger
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void resumeTriggers(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher) throws org.quartz.SchedulerException
resumeTriggers
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void pauseAll() throws org.quartz.SchedulerException
pauseAll
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void resumeAll() throws org.quartz.SchedulerException
resumeAll
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public List<String> getJobGroupNames() throws org.quartz.SchedulerException
getJobGroupNames
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public Set<org.quartz.JobKey> getJobKeys(org.quartz.impl.matchers.GroupMatcher<org.quartz.JobKey> matcher) throws org.quartz.SchedulerException
getJobKeys
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public List<? extends org.quartz.Trigger> getTriggersOfJob(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
getTriggersOfJob
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public List<String> getTriggerGroupNames() throws org.quartz.SchedulerException
getTriggerGroupNames
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public Set<org.quartz.TriggerKey> getTriggerKeys(org.quartz.impl.matchers.GroupMatcher<org.quartz.TriggerKey> matcher) throws org.quartz.SchedulerException
getTriggerKeys
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public Set<String> getPausedTriggerGroups() throws org.quartz.SchedulerException
getPausedTriggerGroups
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public org.quartz.JobDetail getJobDetail(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
getJobDetail
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public org.quartz.Trigger getTrigger(org.quartz.TriggerKey triggerKey) throws org.quartz.SchedulerException
getTrigger
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public org.quartz.Trigger.TriggerState getTriggerState(org.quartz.TriggerKey triggerKey) throws org.quartz.SchedulerException
getTriggerState
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void addCalendar(String calName, org.quartz.Calendar calendar, boolean replace, boolean updateTriggers) throws org.quartz.SchedulerException
addCalendar
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean deleteCalendar(String calName) throws org.quartz.SchedulerException
deleteCalendar
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public org.quartz.Calendar getCalendar(String calName) throws org.quartz.SchedulerException
getCalendar
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public List<String> getCalendarNames() throws org.quartz.SchedulerException
getCalendarNames
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean interrupt(org.quartz.JobKey jobKey) throws org.quartz.UnableToInterruptJobException
interrupt
in interface org.quartz.Scheduler
org.quartz.UnableToInterruptJobException
public boolean interrupt(String fireInstanceId) throws org.quartz.UnableToInterruptJobException
interrupt
in interface org.quartz.Scheduler
org.quartz.UnableToInterruptJobException
public boolean checkExists(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
checkExists
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public boolean checkExists(org.quartz.TriggerKey triggerKey) throws org.quartz.SchedulerException
checkExists
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public void clear() throws org.quartz.SchedulerException
clear
in interface org.quartz.Scheduler
org.quartz.SchedulerException
public JobExecuteTypeInCluster getJobExecuteType()
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.