|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.harvester.scheduler.jobgen.AbstractJobGenerator
dk.netarkivet.harvester.scheduler.jobgen.DefaultJobGenerator
public class DefaultJobGenerator
The legacy job generator implementation. Aims at generating jobs that execute in a predictable time by taking advantage of previous crawls statistics.
Nested Class Summary | |
---|---|
static class |
DefaultJobGenerator.CompareConfigsDesc
Compare two configurations using the following order: 1) Harvest template 2) Byte limit 3) expected number of object a harvest of the configuration will produce. |
Constructor Summary | |
---|---|
DefaultJobGenerator()
|
Method Summary | |
---|---|
protected boolean |
checkSpecificAcceptConditions(Job job,
DomainConfiguration cfg)
Called by AbstractJobGenerator.canAccept(Job, DomainConfiguration) . |
protected java.util.Comparator<DomainConfiguration> |
getDomainConfigurationSubsetComparator(HarvestDefinition harvest)
Returns a comparator used to sort the subset of AbstractJobGenerator.DOMAIN_CONFIG_SUBSET_SIZE
configurations that are scanned at each iteration. |
static DefaultJobGenerator |
getInstance()
|
protected int |
processDomainConfigurationSubset(HarvestDefinition harvest,
java.util.Iterator<DomainConfiguration> domainConfSubset)
Create new jobs from a collection of configurations. |
static void |
reset()
Only to be used by unittests. |
Methods inherited from class dk.netarkivet.harvester.scheduler.jobgen.AbstractJobGenerator |
---|
canAccept, editJobOrderXml, generateJobs, getNewJob |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultJobGenerator()
Method Detail |
---|
public static DefaultJobGenerator getInstance()
protected java.util.Comparator<DomainConfiguration> getDomainConfigurationSubsetComparator(HarvestDefinition harvest)
AbstractJobGenerator
AbstractJobGenerator.DOMAIN_CONFIG_SUBSET_SIZE
configurations that are scanned at each iteration.
getDomainConfigurationSubsetComparator
in class AbstractJobGenerator
harvest
- the HarvestDefinition
being processed.
protected int processDomainConfigurationSubset(HarvestDefinition harvest, java.util.Iterator<DomainConfiguration> domainConfSubset)
processDomainConfigurationSubset
in class AbstractJobGenerator
harvest
- the HarvestDefinition
being processed.domainConfSubset
- the configurations to use to create the jobs
ArgumentNotValid
- if any of the parameters is null
or if the cfglist does not contain any
configurationsprotected boolean checkSpecificAcceptConditions(Job job, DomainConfiguration cfg)
AbstractJobGenerator
AbstractJobGenerator.canAccept(Job, DomainConfiguration)
. Tests the
implementation-specific conditions to accept the given DomainConfiguration
in the given Job
.
It is assumed that AbstractJobGenerator.checkAddDomainConfInvariant(Job, DomainConfiguration)
has already passed.
checkSpecificAcceptConditions
in class AbstractJobGenerator
job
- the Job
n=being builtcfg
- the DomainConfiguration
to test
public static void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |