org.exist.scheduler
Class SystemJob

java.lang.Object
  extended by org.exist.scheduler.SystemJob
All Implemented Interfaces:
JobDescription, Job
Direct Known Subclasses:
Sync

public abstract class SystemJob
extends Object
implements JobDescription, Job

Class to represent a System Job Should be extended by all classes wishing to schedule as a Job that perform core system functions Classes extending SystemJob may only have a Single Instance running in the scheduler at once, intersecting schedules will be queued.

Author:
Adam Retter

Field Summary
static String JOB_GROUP
           
 
Constructor Summary
SystemJob()
           
 
Method Summary
abstract  void execute(BrokerPool brokerpool, Map params)
          Function that is executed by the Scheduler
 void execute(JobExecutionContext jec)
          The execute method as called by the Quartz Scheduler
 String getGroup()
          Get the name group for the job
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.exist.scheduler.JobDescription
getName
 

Field Detail

JOB_GROUP

public static final String JOB_GROUP
See Also:
Constant Field Values
Constructor Detail

SystemJob

public SystemJob()
Method Detail

getGroup

public final String getGroup()
Description copied from interface: JobDescription
Get the name group for the job

Specified by:
getGroup in interface JobDescription
Returns:
The job's group name

execute

public final void execute(JobExecutionContext jec)
                   throws JobExecutionException
The execute method as called by the Quartz Scheduler

Specified by:
execute in interface Job
Parameters:
jec - The execution context of the executing job
Throws:
JobExecutionException - if there was a problem with the job, this also describes to Quartz how to cleanup the job

execute

public abstract void execute(BrokerPool brokerpool,
                             Map params)
                      throws JobException
Function that is executed by the Scheduler

Parameters:
brokerpool - The BrokerPool for the Scheduler of this job
params - Any parameters passed to the job or null otherwise
Throws:
JobException - if there is a problem with the job. cleanupJob() should then be called, which will adjust the jobs scheduling appropriately


Copyright (C) Wolfgang Meier. All rights reserved.