Record Class RunProgressWriter.ProgressRecord
java.lang.Object
java.lang.Record
com.norconex.crawler.core.cmd.crawl.RunProgressWriter.ProgressRecord
- Record Components:
type-progressorheartbeatcrawlerId- the crawler this concernsat- when the sample was takenelapsedMs- milliseconds since the crawl beganqueued- references waiting to be processed. A reference is a ledger entry, not necessarily a document: a folder traversed for its children is counted here tooprocessing- references being processed right nowprocessed- references processed so far this runbaseline- references from the previous run not yet seen againsessionEventCounts- what this crawl session has done, by event name, spanning the runs of a resumed crawl the same way the gauges above do. Every event the crawler fires is counted, so this is not a selection: ask it forCOMMITTER_UPSERT_ENDto get documents committed, and a new event type appears as a new key with nothing to change hererunEventCounts- the share of those totals belonging to this run, which differs from the session's only when a crawl was stopped and resumed
- Enclosing class:
RunProgressWriter
public static record RunProgressWriter.ProgressRecord(String type, String crawlerId, Instant at, long elapsedMs, long queued, long processing, long processed, long baseline, Map<String,Long> sessionEventCounts, Map<String,Long> runEventCounts)
extends Record
One line of the progress file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionat()Returns the value of theatrecord component.longbaseline()Returns the value of thebaselinerecord component.Returns the value of thecrawlerIdrecord component.longReturns the value of theelapsedMsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theprocessedrecord component.longReturns the value of theprocessingrecord component.longqueued()Returns the value of thequeuedrecord component.Returns the value of therunEventCountsrecord component.Returns the value of thesessionEventCountsrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ProgressRecord
public ProgressRecord(String type, String crawlerId, Instant at, long elapsedMs, long queued, long processing, long processed, long baseline, Map<String, Long> sessionEventCounts, Map<String, Long> runEventCounts) Creates an instance of aProgressRecordrecord class.- Parameters:
type- the value for thetyperecord componentcrawlerId- the value for thecrawlerIdrecord componentat- the value for theatrecord componentelapsedMs- the value for theelapsedMsrecord componentqueued- the value for thequeuedrecord componentprocessing- the value for theprocessingrecord componentprocessed- the value for theprocessedrecord componentbaseline- the value for thebaselinerecord componentsessionEventCounts- the value for thesessionEventCountsrecord componentrunEventCounts- the value for therunEventCountsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
crawlerId
Returns the value of thecrawlerIdrecord component.- Returns:
- the value of the
crawlerIdrecord component
-
at
Returns the value of theatrecord component.- Returns:
- the value of the
atrecord component
-
elapsedMs
public long elapsedMs()Returns the value of theelapsedMsrecord component.- Returns:
- the value of the
elapsedMsrecord component
-
queued
public long queued()Returns the value of thequeuedrecord component.- Returns:
- the value of the
queuedrecord component
-
processing
public long processing()Returns the value of theprocessingrecord component.- Returns:
- the value of the
processingrecord component
-
processed
public long processed()Returns the value of theprocessedrecord component.- Returns:
- the value of the
processedrecord component
-
baseline
public long baseline()Returns the value of thebaselinerecord component.- Returns:
- the value of the
baselinerecord component
-
sessionEventCounts
Returns the value of thesessionEventCountsrecord component.- Returns:
- the value of the
sessionEventCountsrecord component
-
runEventCounts
Returns the value of therunEventCountsrecord component.- Returns:
- the value of the
runEventCountsrecord component
-