Class InMemoryFrontierReport
- java.lang.Object
-
- dk.netarkivet.harvester.harvesting.frontier.InMemoryFrontierReport
-
- All Implemented Interfaces:
FrontierReport
,java.io.Serializable
public class InMemoryFrontierReport extends java.lang.Object implements java.io.Serializable
Implements a frontier report wrapper that is stored in memory. This implementation is intended for small reports that are the result of the filtering of a full frontier report obtained from Heritrix 1. This implementation is serializable, so it can be transmitted in a JMS message.The report lines are sorted according to the natural order defined by
FrontierReportLine
, e.g. descending size of the queue.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InMemoryFrontierReport(java.lang.String jobName)
Builds an empty report.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLine(FrontierReportLine line)
Add a line to the report.java.lang.String
getJobName()
FrontierReportLine
getLineForDomain(java.lang.String domainName)
Returns the line of the frontier report corresponding to the queue for the given domain name.FrontierReportLine[]
getLines()
Returns the lines of the report.int
getSize()
Returns the report size, e.g.long
getTimestamp()
protected void
setJobName(java.lang.String jobName)
void
setTimestamp(long timestamp)
-
-
-
Constructor Detail
-
InMemoryFrontierReport
public InMemoryFrontierReport(java.lang.String jobName)
Builds an empty report.- Parameters:
jobName
- the Heritrix job name
-
-
Method Detail
-
getLines
public FrontierReportLine[] getLines()
Returns the lines of the report.- Returns:
- the lines of the report.
-
addLine
public void addLine(FrontierReportLine line)
Description copied from interface:FrontierReport
Add a line to the report.- Specified by:
addLine
in interfaceFrontierReport
- Parameters:
line
- line to add.
-
getLineForDomain
public FrontierReportLine getLineForDomain(java.lang.String domainName)
Description copied from interface:FrontierReport
Returns the line of the frontier report corresponding to the queue for the given domain name.- Specified by:
getLineForDomain
in interfaceFrontierReport
- Parameters:
domainName
- the domain name.- Returns:
- null if no queue for this domain name exists, otherwise the line of the frontier report corresponding to the queue for the given domain name.
-
getSize
public int getSize()
Returns the report size, e.g. the count of report lines.- Returns:
- the report size
-
getJobName
public java.lang.String getJobName()
- Specified by:
getJobName
in interfaceFrontierReport
- Returns:
- the jobName
-
getTimestamp
public long getTimestamp()
- Specified by:
getTimestamp
in interfaceFrontierReport
- Returns:
- the creation timestamp
-
setJobName
protected void setJobName(java.lang.String jobName)
- Parameters:
jobName
- the jobName to set
-
setTimestamp
public void setTimestamp(long timestamp)
- Parameters:
timestamp
- the timestamp to set
-
-