Class StartedJobInfo
- java.lang.Object
-
- dk.netarkivet.harvester.harvesting.monitor.StartedJobInfo
-
- All Implemented Interfaces:
Comparable<StartedJobInfo>
public class StartedJobInfo extends Object implements Comparable<StartedJobInfo>
This class is a simple bean storing information about a started job.This class is a persistent entity as per Berkeley DB JE DPL API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StartedJobInfo.Criteria
list of the compare criteria.
-
Constructor Summary
Constructors Constructor Description StartedJobInfo()
Needed by BDB DPL.StartedJobInfo(String harvestName, long jobId)
Instantiates all readable fields with default values.
-
Method Summary
-
-
-
Constructor Detail
-
StartedJobInfo
public StartedJobInfo()
Needed by BDB DPL.
-
StartedJobInfo
public StartedJobInfo(String harvestName, long jobId)
Instantiates all readable fields with default values.- Parameters:
harvestName
- the name of the harvestjobId
- the ID of the job
-
-
Method Detail
-
getJobId
public long getJobId()
- Returns:
- the job ID.
-
getHarvestName
public String getHarvestName()
- Returns:
- the harvest name.
-
getTimestamp
public Date getTimestamp()
- Returns:
- the timestamp
-
getHostName
public String getHostName()
- Returns:
- the name of the host on which Heritrix is crawling this job.
-
getHostUrl
public String getHostUrl()
- Returns:
- the URL of the Heritrix admin console for the instance crawling this job.
-
getProgress
public double getProgress()
- Returns:
- the crawl progress as a numeric percentage.
-
getQueuedFilesCount
public long getQueuedFilesCount()
- Returns:
- the number of queued files reported by Heritrix.
-
getTotalQueuesCount
public long getTotalQueuesCount()
- Returns:
- the number of queues reported by Heritrix.
-
getActiveQueuesCount
public long getActiveQueuesCount()
- Returns:
- the number of active queues reported by Heritrix.
-
getRetiredQueuesCount
public long getRetiredQueuesCount()
- Returns:
- the number of retired heritrix queues.
-
getExhaustedQueuesCount
public long getExhaustedQueuesCount()
- Returns:
- the number of exhausted queues reported by Heritrix.
-
getElapsedTime
public String getElapsedTime()
- Returns:
- the formatted duration of the crawl.
-
getElapsedSeconds
public Long getElapsedSeconds()
- Returns:
- the duration of the crawl so far.
-
getAlertsCount
public long getAlertsCount()
- Returns:
- the number of alerts raised by Heritrix.
-
getDownloadedFilesCount
public long getDownloadedFilesCount()
- Returns:
- the number of downloaded URIs reported by Heritrix.
-
getCurrentProcessedKBPerSec
public long getCurrentProcessedKBPerSec()
- Returns:
- the current download rate in KB/sec reported by Heritrix.
-
getProcessedKBPerSec
public long getProcessedKBPerSec()
- Returns:
- the average download rate in KB/sec reported by Heritrix.
-
getCurrentProcessedDocsPerSec
public double getCurrentProcessedDocsPerSec()
- Returns:
- the current download rate in URI/sec reported by Heritrix.
-
getProcessedDocsPerSec
public double getProcessedDocsPerSec()
- Returns:
- the average download rate in URI/sec reported by Heritrix.
-
getActiveToeCount
public int getActiveToeCount()
- Returns:
- the number of active processor threads reported by Heritrix.
-
getStatus
public CrawlProgressMessage.CrawlStatus getStatus()
- Returns:
- the job status
- See Also:
CrawlProgressMessage.CrawlStatus
-
compareTo
public int compareTo(StartedJobInfo o) throws NullPointerException
- Specified by:
compareTo
in interfaceComparable<StartedJobInfo>
- Throws:
NullPointerException
-
chooseCompareCriteria
public void chooseCompareCriteria(StartedJobInfo.Criteria criteria)
set the criteria used in the compareTo method that way we can decide how to sort StartedJobInfo.- Parameters:
criteria
- the criteria we want to use
-
build
public static StartedJobInfo build(CrawlProgressMessage msg)
Updates the members from aCrawlProgressMessage
instance.- Parameters:
msg
- theCrawlProgressMessage
to process.- Returns:
- jobinfo based on the contents of the message.
-
setHostUrl
public void setHostUrl(String hostUrl)
- Parameters:
hostUrl
- the hostUrl to set
-
setProgress
public void setProgress(double progress)
- Parameters:
progress
- the progress to set
-
setQueuedFilesCount
public void setQueuedFilesCount(long queuedFilesCount)
- Parameters:
queuedFilesCount
- the queuedFilesCount to set
-
setDownloadedFilesCount
public void setDownloadedFilesCount(long downloadedFilesCount)
- Parameters:
downloadedFilesCount
- the downloadedFilesCount to set
-
setTotalQueuesCount
public void setTotalQueuesCount(long totalQueuesCount)
- Parameters:
totalQueuesCount
- the totalQueuesCount to set
-
setActiveQueuesCount
public void setActiveQueuesCount(long activeQueuesCount)
- Parameters:
activeQueuesCount
- the activeQueuesCount to set
-
setExhaustedQueuesCount
public void setExhaustedQueuesCount(long exhaustedQueuesCount)
- Parameters:
exhaustedQueuesCount
- the exhaustedQueuesCount to set
-
setElapsedSeconds
public void setElapsedSeconds(long elapsedSeconds)
- Parameters:
elapsedSeconds
- the elapsedSeconds to set
-
setCurrentProcessedKBPerSec
public void setCurrentProcessedKBPerSec(long currentProcessedKBPerSec)
- Parameters:
currentProcessedKBPerSec
- the currentProcessedKBPerSec to set
-
setProcessedKBPerSec
public void setProcessedKBPerSec(long processedKBPerSec)
- Parameters:
processedKBPerSec
- the processedKBPerSec to set
-
setCurrentProcessedDocsPerSec
public void setCurrentProcessedDocsPerSec(double currentProcessedDocsPerSec)
- Parameters:
currentProcessedDocsPerSec
- the currentProcessedDocsPerSec to set
-
setProcessedDocsPerSec
public void setProcessedDocsPerSec(double processedDocsPerSec)
- Parameters:
processedDocsPerSec
- the processedDocsPerSec to set
-
setActiveToeCount
public void setActiveToeCount(int activeToeCount)
- Parameters:
activeToeCount
- the activeToeCount to set
-
setAlertsCount
public void setAlertsCount(long alertsCount)
- Parameters:
alertsCount
- the alertsCount to set
-
setStatus
public void setStatus(CrawlProgressMessage.CrawlStatus status)
- Parameters:
status
- the status to set
-
setTimestamp
public void setTimestamp(Date timestamp)
- Parameters:
timestamp
- the timestamp to set
-
setRetiredQueuesCount
public void setRetiredQueuesCount(long retiredQueuesCount)
- Parameters:
retiredQueuesCount
- the retiredQueuesCount to set
-
getInactiveQueuesCount
public long getInactiveQueuesCount()
-
setInactiveQueuesCount
public void setInactiveQueuesCount(long inactiveQueuesCount)
-
-