java.lang.Object
org.apache.jena.system.progress.ProgressMonitorOutput
- All Implemented Interfaces:
ProgressMonitor
Progress monitor - output lines to show the progress of some long running operation.
This is based on "ticks", not time.
Once per item processed, call the
tick() operation.-
Constructor Summary
ConstructorsConstructorDescriptionProgressMonitorOutput(String label, long tickPoint, int superTick, MonitorOutput output) -
Method Summary
Modifier and TypeMethodDescriptionstatic ProgressMonitorOutputcreate(MonitorOutput output, String label, long tickPoint, int superTick) ProgressMonitor that outputs to on aMonitorOutputstatic ProgressMonitorOutputProgressMonitor that outputs to aLoggervoidfinish()Finish and stop timing.voidfinishMessage(String msg) Output the finishing message.voidFinish a section within the overall start-finish.getLabel()longReturn the number of ticks.longReturn the elapsed section time taken.longgetTicks()Return the number of ticks.longgetTime()Return the elapsed time taken - this is only valid afterProgressMonitor.finish()has been called.voidvoidstart()Start and start timing.voidstartMessage(String msg) Print a start message using a different string.voidStart a section within the overall start-finish.voidtick()Something happened
-
Constructor Details
-
ProgressMonitorOutput
- 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 Details
-
create
public static ProgressMonitorOutput create(org.slf4j.Logger log, String label, long tickPoint, int superTick) ProgressMonitor that outputs to aLogger -
create
public static ProgressMonitorOutput create(MonitorOutput output, String label, long tickPoint, int superTick) ProgressMonitor that outputs to on aMonitorOutput -
startMessage
Print a start message using a different string.- Specified by:
startMessagein interfaceProgressMonitor
-
finishMessage
Description copied from interface:ProgressMonitorOutput the finishing message. The format is implementation dependent.- Specified by:
finishMessagein interfaceProgressMonitor
-
start
public void start()Description copied from interface:ProgressMonitorStart and start timing. This should be paired with a call toProgressMonitor.finish().- Specified by:
startin interfaceProgressMonitor
-
finish
public void finish()Description copied from interface:ProgressMonitorFinish and stop timing. The total time is available withProgressMonitor.getTime()and the number of items processes withProgressMonitor.getTicks().- Specified by:
finishin interfaceProgressMonitor
-
tick
public void tick()Description copied from interface:ProgressMonitorSomething happened- Specified by:
tickin interfaceProgressMonitor
-
getTicks
public long getTicks()Description copied from interface:ProgressMonitorReturn the number of ticks. Valid afterProgressMonitor.start()has been called.- Specified by:
getTicksin interfaceProgressMonitor
-
getTime
public long getTime()Description copied from interface:ProgressMonitorReturn the elapsed time taken - this is only valid afterProgressMonitor.finish()has been called.- Specified by:
getTimein interfaceProgressMonitor
-
startSection
public void startSection()Description copied from interface:ProgressMonitorStart a section within the overall start-finish.- Specified by:
startSectionin interfaceProgressMonitor
-
finishSection
public void finishSection()Description copied from interface:ProgressMonitorFinish a section within the overall start-finish.- Specified by:
finishSectionin interfaceProgressMonitor
-
getSectionTicks
public long getSectionTicks()Description copied from interface:ProgressMonitorReturn the number of ticks. Valid afterProgressMonitor.startSection()has been called.- Specified by:
getSectionTicksin interfaceProgressMonitor
-
getSectionTime
public long getSectionTime()Description copied from interface:ProgressMonitorReturn the elapsed section time taken.- Specified by:
getSectionTimein interfaceProgressMonitor
-
getLabel
- Specified by:
getLabelin interfaceProgressMonitor
-
setLabel
- Specified by:
setLabelin interfaceProgressMonitor
-