|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.lifecycle.LifeCycleComponent
dk.netarkivet.harvester.scheduler.HarvestScheduler
public class HarvestScheduler
This class handles dispatching of scheduled Harvest jobs to the Harvest servers.
The scheduler loads all active harvest definitions on a regular basis and extracts the scheduling information for each definition. When a harvest definition is scheduled to start the scheduler creates the corresponding harvest jobs and submits these to the active HarvestServers.
It also handles backup and makes sure backup is not performed while jobs are being scheduled.
Note: Only one HarvestScheduler
should be running at a time.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
The logger to use. |
Constructor Summary | |
---|---|
HarvestScheduler()
Create new instance of the HarvestScheduler. |
Method Summary | |
---|---|
(package private) void |
dispatchJobs()
Dispatched new jobs Stop jobs with status STARTED, which have been on running for more than settings.harvester.scheduler.jobtimeouttime time. |
void |
doOneCrawl(Job job,
java.util.List<MetadataEntry> metadata)
Submit an doOneCrawl request to a HarvestControllerServer with correct priority. |
void |
shutdown()
Release allocated resources (JMS connections) and stops dispatching harvest jobs, all without logging. |
void |
start()
Start the thread responsible for reading Harvest definitions from the database, and dispatching the harvest job to the servers. |
(package private) void |
submitNewJobs()
Submit the next new job if the relevant message queue is empty. |
Methods inherited from class dk.netarkivet.common.lifecycle.LifeCycleComponent |
---|
addChild |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log log
Constructor Detail |
---|
public HarvestScheduler()
Method Detail |
---|
public void start()
start
in interface ComponentLifeCycle
start
in class LifeCycleComponent
void dispatchJobs()
void submitNewJobs()
public void doOneCrawl(Job job, java.util.List<MetadataEntry> metadata) throws ArgumentNotValid, IOFailure
job
- the specific job to sendmetadata
- pre-harvest metadata to store in arcfile.
ArgumentNotValid
- one of the parameters are null
IOFailure
- if unable to send the doOneCrawl request to a
harvestControllerServerpublic void shutdown()
shutdown
in interface ComponentLifeCycle
shutdown
in class LifeCycleComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |