dk.netarkivet.harvester.harvesting.frontier
Class InMemoryFrontierReport

java.lang.Object
  extended by dk.netarkivet.harvester.harvesting.frontier.AbstractFrontierReport
      extended by dk.netarkivet.harvester.harvesting.frontier.InMemoryFrontierReport
All Implemented Interfaces:
FrontierReport, java.io.Serializable

public class InMemoryFrontierReport
extends AbstractFrontierReport
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. 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
InMemoryFrontierReport()
          Default empty contructor.
InMemoryFrontierReport(java.lang.String jobName)
          Builds an empty report.
 
Method Summary
 void addLine(FrontierReportLine line)
          Add a line to the report.
 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.
 
Methods inherited from class dk.netarkivet.harvester.harvesting.frontier.AbstractFrontierReport
getJobName, getTimestamp, setJobName, setTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryFrontierReport

InMemoryFrontierReport()
Default empty contructor.


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 interface FrontierReport
Specified by:
addLine in class AbstractFrontierReport
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 interface FrontierReport
Specified by:
getLineForDomain in class AbstractFrontierReport
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