public class FixedDomainConfigurationCountJobGenerator extends Object
Modifier and Type | Field and Description |
---|---|
static FixedDomainConfigurationCountJobGenerator |
instance
The singleton instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAccept(Job job,
DomainConfiguration cfg,
DomainConfiguration previousCfg)
Tests if a configuration fits into this Job.
|
protected boolean |
checkSpecificAcceptConditions(Job job,
DomainConfiguration cfg)
|
protected void |
editJobOrderXml(Job job)
Once the job has been filled with
DomainConfiguration s, performs the following operations:
Edit the harvest template to add/remove deduplicator configuration.
|
int |
generateJobs(HarvestDefinition harvest)
Generates a series of jobs for the given harvest definition.
|
protected Comparator<DomainConfiguration> |
getDomainConfigurationSubsetComparator(HarvestDefinition harvest)
Returns a comparator used to sort the subset of
DOMAIN_CONFIG_SUBSET_SIZE configurations that are
scanned at each iteration. |
static FixedDomainConfigurationCountJobGenerator |
getInstance() |
Job |
getNewJob(HarvestDefinition harvest,
DomainConfiguration cfg)
Instantiates a new job.
|
protected int |
processDomainConfigurationSubset(HarvestDefinition harvest,
Iterator<DomainConfiguration> domainConfSubset)
Create new jobs from a collection of configurations.
|
public static FixedDomainConfigurationCountJobGenerator instance
public static FixedDomainConfigurationCountJobGenerator getInstance()
protected Comparator<DomainConfiguration> getDomainConfigurationSubsetComparator(HarvestDefinition harvest)
DOMAIN_CONFIG_SUBSET_SIZE
configurations that are
scanned at each iteration.harvest
- the HarvestDefinition
being processed.protected boolean checkSpecificAcceptConditions(Job job, DomainConfiguration cfg)
JobGenerator.canAccept(Job, DomainConfiguration, DomainConfiguration)
. Tests the implementation-specific conditions to accept
the given DomainConfiguration
in the given Job
. It is assumed that
checkAddDomainConfInvariant(Job, DomainConfiguration, DomainConfiguration)
has already passed.job
- the Job
n=being builtcfg
- the DomainConfiguration
to testpublic int generateJobs(HarvestDefinition harvest)
JobGenerator
generateJobs
in interface JobGenerator
harvest
- the harvest definition to process.protected int processDomainConfigurationSubset(HarvestDefinition harvest, Iterator<DomainConfiguration> domainConfSubset)
harvest
- the HarvestDefinition
being processed.domainConfSubset
- the configurations to use to create the jobspublic Job getNewJob(HarvestDefinition harvest, DomainConfiguration cfg)
cfg
- the DomainConfiguration
being processedharvest
- the HarvestDefinition
being processedJob
public boolean canAccept(Job job, DomainConfiguration cfg, DomainConfiguration previousCfg)
JobGenerator
canAccept
in interface JobGenerator
job
- the job being built.cfg
- the configuration to checkpreviousCfg
- if not null, the configuration added to this job immediately priorprotected void editJobOrderXml(Job job)
DomainConfiguration
s, performs the following operations:
job
- the jobCopyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.