|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.datamodel.HarvestDefinition dk.netarkivet.harvester.datamodel.FullHarvest
public class FullHarvest
This class contains the specific properties and operations of snapshot harvest definitions.
Field Summary |
---|
Fields inherited from class dk.netarkivet.harvester.datamodel.HarvestDefinition |
---|
comments, edition, harvestDefName, isActive, numEvents, oid, submissionDate |
Constructor Summary | |
---|---|
FullHarvest(java.lang.String harvestDefName,
java.lang.String comments,
java.lang.Long previousHarvestDefinitionOid,
long maxCountObjects,
long maxBytes,
long maxJobRunningTime,
boolean isIndexReady)
Create new instance of FullHarvest configured according to the properties of the supplied DomainConfiguration. |
Method Summary | |
---|---|
java.util.Iterator<DomainConfiguration> |
getDomainConfigurations()
Returns an iterator of domain configurations for this harvest definition. |
boolean |
getIndexReady()
Is index ready. |
long |
getMaxBytes()
Get the maximum number of bytes that this fullharvest will harvest per domain, 0 for no limit. |
long |
getMaxCountObjects()
Returns how many objects to harvest per domain, or 0 for no limit. |
long |
getMaxJobRunningTime()
|
protected Job |
getNewJob(DomainConfiguration cfg)
Get a new Job suited for this type of HarvestDefinition. |
HarvestDefinition |
getPreviousHarvestDefinition()
Get the previous HarvestDefinition which is used to base this. |
boolean |
isSnapShot()
Returns whether this HarvestDefinition represents a snapshot harvest. |
boolean |
runNow(java.util.Date now)
Check if this harvest definition should be run, given the time now. |
void |
setIndexReady(boolean isIndexReady)
Set the indexReady field. |
void |
setMaxBytes(long maxBytes)
Set the limit for how many bytes this fullharvest will harvest per domain, or -1 for no limit. |
void |
setMaxCountObjects(long maxCountObjects)
|
void |
setMaxJobRunningTime(long maxJobRunningtime)
Set the limit for how many seconds each crawljob in this fullharvest will run, or 0 for no limit. |
void |
setPreviousHarvestDefinition(java.lang.Long prev)
Set the previous HarvestDefinition which is used to base this. |
Methods inherited from class dk.netarkivet.harvester.datamodel.HarvestDefinition |
---|
createFullHarvest, createJobs, createPartialHarvest, equals, getActive, getComments, getEdition, getName, getNumEvents, getOid, getSubmissionDate, hashCode, hasID, makeJobs, setActive, setComments, setEdition, setNumEvents, setOid, setSubmissionDate, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FullHarvest(java.lang.String harvestDefName, java.lang.String comments, java.lang.Long previousHarvestDefinitionOid, long maxCountObjects, long maxBytes, long maxJobRunningTime, boolean isIndexReady)
harvestDefName
- the name of the harvest definitioncomments
- commentspreviousHarvestDefinitionOid
- This harvestDefinition is used to
create this Fullharvest definition.maxCountObjects
- Limit for how many objects can be
fetched per domainmaxBytes
- Limit for how many bytes can be
fetched per domainmaxJobRunningTime
- Limit on how much time can be spent
on each job. 0 means no limitisIndexReady
- Is the deduplication index ready
for this harvest.Method Detail |
---|
protected Job getNewJob(DomainConfiguration cfg)
getNewJob
in class HarvestDefinition
cfg
- The configuration to use when creating the job
public HarvestDefinition getPreviousHarvestDefinition()
public void setPreviousHarvestDefinition(java.lang.Long prev)
prev
- The id of a HarvestDefinitionpublic long getMaxCountObjects()
HarvestDefinition
getMaxCountObjects
in class HarvestDefinition
public void setMaxCountObjects(long maxCountObjects)
maxCountObjects
- The maxCountObjects to set.public long getMaxBytes()
getMaxBytes
in class HarvestDefinition
public void setMaxBytes(long maxBytes)
maxBytes
- Number of bytes to stop harvesting at.public java.util.Iterator<DomainConfiguration> getDomainConfigurations()
getDomainConfigurations
in class HarvestDefinition
public boolean runNow(java.util.Date now)
runNow
in class HarvestDefinition
now
- The current time
public boolean isSnapShot()
isSnapShot
in class HarvestDefinition
public long getMaxJobRunningTime()
public void setMaxJobRunningTime(long maxJobRunningtime)
maxJobRunningtime
- max number of secondspublic boolean getIndexReady()
public void setIndexReady(boolean isIndexReady)
isIndexReady
- The new value of the indexReady field.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |