public class ExecutionSchedulerImpl extends Object implements ExecutionScheduler
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_SCHEDULER_NAME |
protected static boolean |
isInitialized |
protected org.quartz.Scheduler |
scheduler |
Modifier | Constructor and Description |
---|---|
protected |
ExecutionSchedulerImpl(Configuration configuration)
Constructor used for unit testing
|
|
ExecutionSchedulerImpl(com.google.inject.Injector injector) |
Modifier and Type | Method and Description |
---|---|
void |
addJob(org.quartz.JobDetail jobDetail)
Persist job data
|
void |
deleteJob(org.quartz.JobKey jobKey)
Delete the identified Job from the Scheduler - and any associated Triggers.
|
org.quartz.JobDetail |
getJobDetail(org.quartz.JobKey jobKey)
Get details for a job from scheduler.
|
protected String[] |
getQuartzDbDelegateClassAndValidationQuery() |
protected Properties |
getQuartzSchedulerProperties() |
List<? extends org.quartz.Trigger> |
getTriggersForJob(org.quartz.JobKey jobKey)
Get all triggers created for a job.
|
protected void |
initializeScheduler() |
protected boolean |
isInitialized() |
boolean |
isSchedulerStarted()
Check whether the scheduler is already running.
|
void |
scheduleJob(org.quartz.Trigger trigger)
Add a trigger to the execution scheduler
|
void |
startScheduler(Integer delay)
Initialize and start the scheduler to accept jobs.
|
void |
stopScheduler()
Shutdown the scheduler threads and do not accept any more jobs.
|
protected static final String DEFAULT_SCHEDULER_NAME
protected org.quartz.Scheduler scheduler
protected static volatile boolean isInitialized
@Inject public ExecutionSchedulerImpl(com.google.inject.Injector injector)
protected ExecutionSchedulerImpl(Configuration configuration)
configuration
- protected void initializeScheduler()
protected Properties getQuartzSchedulerProperties()
protected boolean isInitialized()
protected String[] getQuartzDbDelegateClassAndValidationQuery()
public void startScheduler(Integer delay) throws org.apache.ambari.server.AmbariException
ExecutionScheduler
startScheduler
in interface ExecutionScheduler
org.apache.ambari.server.AmbariException
public void stopScheduler() throws org.apache.ambari.server.AmbariException
ExecutionScheduler
stopScheduler
in interface ExecutionScheduler
org.apache.ambari.server.AmbariException
public void scheduleJob(org.quartz.Trigger trigger) throws org.quartz.SchedulerException
ExecutionScheduler
scheduleJob
in interface ExecutionScheduler
org.quartz.SchedulerException
public void addJob(org.quartz.JobDetail jobDetail) throws org.quartz.SchedulerException
ExecutionScheduler
addJob
in interface ExecutionScheduler
org.quartz.SchedulerException
public void deleteJob(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
ExecutionScheduler
deleteJob
in interface ExecutionScheduler
org.quartz.SchedulerException
public org.quartz.JobDetail getJobDetail(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
ExecutionScheduler
getJobDetail
in interface ExecutionScheduler
org.quartz.SchedulerException
public List<? extends org.quartz.Trigger> getTriggersForJob(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException
ExecutionScheduler
getTriggersForJob
in interface ExecutionScheduler
org.quartz.SchedulerException
public boolean isSchedulerStarted() throws org.quartz.SchedulerException
ExecutionScheduler
isSchedulerStarted
in interface ExecutionScheduler
org.quartz.SchedulerException
Copyright © 2022 Apache Software Foundation. All rights reserved.