|
||||||||||
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.FixedDomainConfigurationCountJobGenerator
public class FixedDomainConfigurationCountJobGenerator
Job generator implementation. Generates jobs with a fixed number of domain configurations. Configuration allows to choose a different count for partial and full harvests. The last job generated may have less configurations in it, as job generation happens on a per-harvest basis.
HarvesterSettings.JOBGEN_FIXED_CONFIG_COUNT_SNAPSHOT
,
HarvesterSettings.JOBGEN_FIXED_CONFIG_COUNT_FOCUSED
Field Summary | |
---|---|
static FixedDomainConfigurationCountJobGenerator |
instance
The singleton instance. |
Method Summary | |
---|---|
protected boolean |
checkSpecificAcceptConditions(Job job,
DomainConfiguration cfg)
Called by AbstractJobGenerator.canAccept(Job, DomainConfiguration) . |
int |
generateJobs(HarvestDefinition harvest)
Generates a series of jobs for the given harvest definition. |
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 FixedDomainConfigurationCountJobGenerator |
getInstance()
|
protected int |
processDomainConfigurationSubset(HarvestDefinition harvest,
java.util.Iterator<DomainConfiguration> domainConfSubset)
Create new jobs from a collection of configurations. |
Methods inherited from class dk.netarkivet.harvester.scheduler.jobgen.AbstractJobGenerator |
---|
canAccept, editJobOrderXml, getNewJob |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static FixedDomainConfigurationCountJobGenerator instance
Method Detail |
---|
public static FixedDomainConfigurationCountJobGenerator 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 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 int generateJobs(HarvestDefinition harvest)
JobGenerator
generateJobs
in interface JobGenerator
generateJobs
in class AbstractJobGenerator
harvest
- the harvest definition to process.
protected int processDomainConfigurationSubset(HarvestDefinition harvest, java.util.Iterator<DomainConfiguration> domainConfSubset)
AbstractJobGenerator
processDomainConfigurationSubset
in class AbstractJobGenerator
harvest
- the HarvestDefinition
being processed.domainConfSubset
- the configurations to use to create the jobs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |