|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.scheduler.Scheduler
public class Scheduler
A Scheduler to trigger Startup, System and User defined jobs
Field Summary | |
---|---|
static String |
CONFIGURATION_ELEMENT_NAME
|
static String |
CONFIGURATION_JOB_ELEMENT_NAME
|
static String |
CONFIGURATION_JOB_PARAMETER_ELEMENT_NAME
|
static String |
JOB_CLASS_ATTRIBUTE
|
static String |
JOB_CRON_TRIGGER_ATTRIBUTE
|
static String |
JOB_DELAY_ATTRIBUTE
|
static String |
JOB_NAME_ATTRIBUTE
|
static String |
JOB_PERIOD_ATTRIBUTE
|
static String |
JOB_REPEAT_ATTRIBUTE
|
static String |
JOB_TYPE_ATTRIBUTE
|
static String |
JOB_TYPE_STARTUP
|
static String |
JOB_TYPE_SYSTEM
|
static String |
JOB_TYPE_USER
|
static String |
JOB_XQUERY_ATTRIBUTE
|
static String |
PROPERTY_SCHEDULER_JOBS
|
Constructor Summary | |
---|---|
Scheduler(BrokerPool brokerpool,
Configuration config)
Create and Start a new Scheduler |
Method Summary | |
---|---|
boolean |
createCronJob(String cronExpression,
JobDescription job)
|
boolean |
createCronJob(String cronExpression,
JobDescription job,
Properties params)
|
boolean |
createPeriodicJob(long period,
JobDescription job,
long delay)
|
boolean |
createPeriodicJob(long period,
JobDescription job,
long delay,
Properties params)
|
boolean |
createPeriodicJob(long period,
JobDescription job,
long delay,
Properties params,
int repeatCount)
|
boolean |
deleteJob(String jobName,
String jobGroup)
Removes a Job from the Scheduler |
void |
executeStartupJobs()
Executes all startup jobs |
ScheduledJobInfo[] |
getExecutingJobs()
Gets information about currently Executing Jobs |
String[] |
getJobGroupNames()
Gets the names of the Job groups |
ScheduledJobInfo[] |
getScheduledJobs()
Gets information about currently Scheduled Jobs |
boolean |
isShutdown()
|
boolean |
pauseJob(String jobName,
String jobGroup)
Pauses a Job with the Scheduler |
boolean |
resumeJob(String jobName,
String jobGroup)
Resume a Job with the Scheduler |
void |
run()
|
void |
setupConfiguredJobs()
Set's up all the jobs that are listed in conf.xml and loaded through org.exist.util.Configuration |
void |
shutdown(boolean waitForJobsToComplete)
Shutdown the running Scheduler Asynchronous method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONFIGURATION_ELEMENT_NAME
public static final String CONFIGURATION_JOB_ELEMENT_NAME
public static final String JOB_TYPE_ATTRIBUTE
public static final String JOB_CLASS_ATTRIBUTE
public static final String JOB_XQUERY_ATTRIBUTE
public static final String JOB_CRON_TRIGGER_ATTRIBUTE
public static final String JOB_PERIOD_ATTRIBUTE
public static final String JOB_DELAY_ATTRIBUTE
public static final String JOB_REPEAT_ATTRIBUTE
public static final String CONFIGURATION_JOB_PARAMETER_ELEMENT_NAME
public static final String PROPERTY_SCHEDULER_JOBS
public static final String JOB_TYPE_USER
public static final String JOB_TYPE_STARTUP
public static final String JOB_TYPE_SYSTEM
public static final String JOB_NAME_ATTRIBUTE
Constructor Detail |
---|
public Scheduler(BrokerPool brokerpool, Configuration config) throws EXistException
brokerpool
- The brokerpool for which this scheduler is intended
EXistException
Method Detail |
---|
public void run()
public void shutdown(boolean waitForJobsToComplete)
public boolean isShutdown()
public void executeStartupJobs()
public boolean createPeriodicJob(long period, JobDescription job, long delay)
period
- The period, in milliseconds.job
- The job to trigger after each perioddelay
- <= 0, start now, otherwise start in specified number of milliseconds
public boolean createPeriodicJob(long period, JobDescription job, long delay, Properties params)
period
- The period, in milliseconds.job
- The job to trigger after each perioddelay
- <= 0, start now, otherwise start in specified number of millisecondsparams
- Any parameters to pass to the job
public boolean createPeriodicJob(long period, JobDescription job, long delay, Properties params, int repeatCount)
period
- The period, in milliseconds.job
- The job to trigger after each perioddelay
- <= 0, start now, otherwise start in specified number of millisecondsparams
- Any parameters to pass to the jobrepeatCount
- Number of times to repeat this job.
public boolean createCronJob(String cronExpression, JobDescription job)
cronExpression
- The Cron scheduling expressionjob
- The job to trigger after each period
public boolean createCronJob(String cronExpression, JobDescription job, Properties params)
cronExpression
- The Cron scheduling expressionjob
- The job to trigger after each periodparams
- Any parameters to pass to the job
public boolean deleteJob(String jobName, String jobGroup)
jobName
- The name of the JobjobGroup
- The group that the Job was Scheduled in
public boolean pauseJob(String jobName, String jobGroup)
jobName
- The name of the JobjobGroup
- The group that the Job was Scheduled inpublic boolean resumeJob(String jobName, String jobGroup)
jobName
- The name of the JobjobGroup
- The group that the Job was Scheduled inpublic String[] getJobGroupNames()
public ScheduledJobInfo[] getScheduledJobs()
public ScheduledJobInfo[] getExecutingJobs()
public void setupConfiguredJobs()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |