Class RecordMeter
java.lang.Object
com.northconcepts.datapipeline.meter.Meter
com.northconcepts.datapipeline.meter.RecordMeter
A
Meter that counts records or their estimated size in bytes.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe unit aRecordMetercounts in: bytes (each record's estimated size) or records. -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCounts the record according to the measure (its estimated size in bytes or one) and returns it; null is ignored.addExceptionProperties(DataException exception) Adds this meter's count and timer state to the given exception and returns it.Returns whether each record adds its estimated size in bytes or one to the count (defaults to BYTES).Returns the rate as a human readable string scaled by powers of 1000, such as12.5 kilo-units/s.setMeasure(RecordMeter.MeterUnit measure) Sets whether each record adds its estimated size in bytes or one to the count (defaults to BYTES).Methods inherited from class com.northconcepts.datapipeline.meter.Meter
add, add, getCount, getElapsedTime, getStarted, getUnitsPerSecond, getUnitsPerSecondAsString, isRunning, reset, stopTimer, toString
-
Constructor Details
-
RecordMeter
public RecordMeter()
-
-
Method Details
-
getMeasure
Returns whether each record adds its estimated size in bytes or one to the count (defaults to BYTES). -
setMeasure
Sets whether each record adds its estimated size in bytes or one to the count (defaults to BYTES). -
getUnitsPerSecondAsString
Description copied from class:MeterReturns the rate as a human readable string scaled by powers of 1000, such as12.5 kilo-units/s.- Overrides:
getUnitsPerSecondAsStringin classMeter
-
add
Counts the record according to the measure (its estimated size in bytes or one) and returns it; null is ignored. -
addExceptionProperties
Description copied from class:MeterAdds this meter's count and timer state to the given exception and returns it.- Overrides:
addExceptionPropertiesin classMeter
-