dk.netarkivet.harvester.scheduler
Class HarvestScheduler

java.lang.Object
  extended by dk.netarkivet.harvester.scheduler.HarvestScheduler
All Implemented Interfaces:
CleanupIF

public class HarvestScheduler
extends java.lang.Object
implements CleanupIF

This class handles scheduling of heritrix jobs. The scheduler loads all active harvest definitions and extracts the scheduling information for each definition. When a harvest definition is scheduled to start the scheduler creates the corresponding heritrix jobs and submits these to the active HarvestServers. It also handles backup and makes sure backup is not performed while jobs are being scheduled. This class is not Threadsafe.


Field Summary
protected static org.apache.commons.logging.Log log
          The logger to use.
 
Method Summary
 void cleanup()
          Release allocated resources (JMS connections), stop scheduling harvests, and nullify the singleton, all without logging.
 void close()
          Release allocated resources (JMS connections), stop scheduling harvests, and nullify the singleton.
static HarvestScheduler getInstance()
          Get the unique instance of the harvest scheduler.
 void run()
          Start scheduling of harvest definitions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
The logger to use.

Method Detail

getInstance

public static HarvestScheduler getInstance()
Get the unique instance of the harvest scheduler. If the instance is new it is started up to begin scheduling harvests.

Returns:
The instance

run

public void run()
Start scheduling of harvest definitions. The location of the harvestdefinition data is retrieved from: settings.xml


close

public void close()
Release allocated resources (JMS connections), stop scheduling harvests, and nullify the singleton.


cleanup

public void cleanup()
Release allocated resources (JMS connections), stop scheduling harvests, and nullify the singleton, all without logging.

Specified by:
cleanup in interface CleanupIF
See Also:
CleanupIF.cleanup()