Package org.apache.jena.atlas.lib
Class ProgressMonitor
- java.lang.Object
-
- org.apache.jena.atlas.lib.ProgressMonitor
-
public class ProgressMonitor extends java.lang.ObjectProgress monitor - output lines to show the progress of some long running operation. This is based on "ticks", not time. Once per item processed, call thetick()operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceProgressMonitor.Output
-
Constructor Summary
Constructors Constructor Description ProgressMonitor(java.lang.String label, long tickPoint, int superTick, ProgressMonitor.Output output)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProgressMonitorcreate(org.slf4j.Logger log, java.lang.String label, long tickPoint, int superTick)ProgressMonitor that outputs to aLoggerlongfinish()voidfinishMessage()longgetTicks()voidstart()voidstartMessage()Print a start message using the labelvoidstartMessage(java.lang.String msg)Print a start message using a different string.voidtick()
-
-
-
Constructor Detail
-
ProgressMonitor
public ProgressMonitor(java.lang.String label, long tickPoint, int superTick, ProgressMonitor.Output output)- Parameters:
label- Label added to output strings. Usually related to the kind of things being monitored. e.g "tuplestickPoint- Frequent of output messagessuperTick- Frequent of "Elapsed" additional messageoutput- Function called to deal with progress messages.
-
-
Method Detail
-
create
public static ProgressMonitor create(org.slf4j.Logger log, java.lang.String label, long tickPoint, int superTick)
ProgressMonitor that outputs to aLogger
-
startMessage
public void startMessage()
Print a start message using the label
-
startMessage
public void startMessage(java.lang.String msg)
Print a start message using a different string.
-
finishMessage
public void finishMessage()
-
start
public void start()
-
finish
public long finish()
-
getTicks
public long getTicks()
-
tick
public void tick()
-
-