public abstract class AbstractProgressLogger extends java.lang.Object implements ProgressLoggerInterface
Modifier | Constructor and Description |
---|---|
protected |
AbstractProgressLogger(java.lang.String noun,
java.lang.String verb,
int n)
Construct an AbstractProgressLogger.
|
Modifier and Type | Method and Description |
---|---|
long |
getCount()
Returns the count of records processed.
|
long |
getElapsedSeconds()
Returns the number of seconds since progress tracking began.
|
protected abstract void |
log(java.lang.String... message)
Log a message to whatever logger is being used
|
boolean |
record(SAMRecord... recs)
Records multiple SAMRecords and triggers logging if necessary.
|
boolean |
record(SAMRecord rec)
Records that a given record has been processed and triggers logging if necessary.
|
boolean |
record(java.lang.String chrom,
int pos) |
protected AbstractProgressLogger(java.lang.String noun, java.lang.String verb, int n)
n
- the frequency with which to output (i.e. every N records)verb
- the verb to log, e.g. "Processed, Read, Written".noun
- the noun to use when logging, e.g. "Records, Variants, Loci"protected abstract void log(java.lang.String... message)
message
- a message to be logged by the logger (recommended output level is INFO or the equivalent)public boolean record(java.lang.String chrom, int pos)
record
in interface ProgressLoggerInterface
public boolean record(SAMRecord rec)
record
in interface ProgressLoggerInterface
public boolean record(SAMRecord... recs)
record
in interface ProgressLoggerInterface
public long getCount()
public long getElapsedSeconds()