|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.harvesting.distribute.PersistentJobData
public class PersistentJobData
Class PersistentJobData holds information about an ongoing harvest. Presently the information is stored in a XML-file.
Nested Class Summary | |
---|---|
static class |
PersistentJobData.HarvestDefinitionInfo
Innerclass containing Info about a harvestjob. |
Constructor Summary | |
---|---|
PersistentJobData(java.io.File crawlDir)
Constructor for class PersistentJobData. |
Method Summary | |
---|---|
boolean |
exists()
Returns true, if harvestInfo exists in crawDir, otherwise false. |
static boolean |
existsIn(java.io.File crawlDir)
Returns true if the given directory exists and contains a harvestInfo file. |
int |
getJobHarvestNum()
Return the job harvestNum. |
java.lang.Long |
getJobID()
Return the harvestInfo jobID. |
JobPriority |
getJobPriority()
Return the job priority. |
long |
getMaxBytesPerDomain()
Return the job maxBytesPerDomain value. |
long |
getMaxObjectsPerDomain()
Return the job maxObjectsPerDomain value. |
java.lang.String |
getOrderXMLName()
Return the job orderXMLName. |
java.lang.Long |
getOrigHarvestDefinitionID()
Return the job origHarvestDefinitionID. |
void |
write(Job harvestJob,
PersistentJobData.HarvestDefinitionInfo hdi)
Write information about given Job to XML-structure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistentJobData(java.io.File crawlDir)
crawlDir
- The directory where the harvestInfo can be found
ArgumentNotValid
- if crawlDir is null or does not exist.Method Detail |
---|
public boolean exists()
public static boolean existsIn(java.io.File crawlDir)
crawlDir
- A directory that may contain harvestInfo file.
public void write(Job harvestJob, PersistentJobData.HarvestDefinitionInfo hdi)
harvestJob
- the given Jobhdi
- Information about the harvestJob.
IOFailure
- if any failure occurs while persisting data, or if
the file has already been written.public java.lang.Long getJobID()
IOFailure
- if no harvestInfo exists or it is invalid.public JobPriority getJobPriority()
IOFailure
- if no harvestInfo exists or it is invalid.public int getJobHarvestNum()
IOFailure
- if no harvestInfo exists or it is invalid.public java.lang.Long getOrigHarvestDefinitionID()
IOFailure
- if no harvestInfo exists or it is invalid.public long getMaxBytesPerDomain()
IOFailure
- if no harvestInfo exists or it is invalid.public long getMaxObjectsPerDomain()
IOFailure
- if no harvestInfo exists or it is invalid.public java.lang.String getOrderXMLName()
IOFailure
- if no harvestInfo exists or it is invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |