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
ConstructorDescriptionProgressMonitorOutput
(String label, long tickPoint, int superTick, MonitorOutput output) -
Method Summary
Modifier and TypeMethodDescriptionstatic ProgressMonitorOutput
create
(MonitorOutput output, String label, long tickPoint, int superTick) ProgressMonitor that outputs to on aMonitorOutput
static ProgressMonitorOutput
ProgressMonitor that outputs to aLogger
void
finish()
Finish and stop timing.void
finishMessage
(String msg) Output the finishing message.void
Finish a section within the overall start-finish.getLabel()
long
Return the number of ticks.long
Return the elapsed section time taken.long
getTicks()
Return the number of ticks.long
getTime()
Return the elapsed time taken - this is only valid afterProgressMonitor.finish()
has been called.void
void
start()
Start and start timing.void
startMessage
(String msg) Print a start message using a different string.void
Start a section within the overall start-finish.void
tick()
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:
startMessage
in interfaceProgressMonitor
-
finishMessage
Description copied from interface:ProgressMonitor
Output the finishing message. The format is implementation dependent.- Specified by:
finishMessage
in interfaceProgressMonitor
-
start
public void start()Description copied from interface:ProgressMonitor
Start and start timing. This should be paired with a call toProgressMonitor.finish()
.- Specified by:
start
in interfaceProgressMonitor
-
finish
public void finish()Description copied from interface:ProgressMonitor
Finish and stop timing. The total time is available withProgressMonitor.getTime()
and the number of items processes withProgressMonitor.getTicks()
.- Specified by:
finish
in interfaceProgressMonitor
-
tick
public void tick()Description copied from interface:ProgressMonitor
Something happened- Specified by:
tick
in interfaceProgressMonitor
-
getTicks
public long getTicks()Description copied from interface:ProgressMonitor
Return the number of ticks. Valid afterProgressMonitor.start()
has been called.- Specified by:
getTicks
in interfaceProgressMonitor
-
getTime
public long getTime()Description copied from interface:ProgressMonitor
Return the elapsed time taken - this is only valid afterProgressMonitor.finish()
has been called.- Specified by:
getTime
in interfaceProgressMonitor
-
startSection
public void startSection()Description copied from interface:ProgressMonitor
Start a section within the overall start-finish.- Specified by:
startSection
in interfaceProgressMonitor
-
finishSection
public void finishSection()Description copied from interface:ProgressMonitor
Finish a section within the overall start-finish.- Specified by:
finishSection
in interfaceProgressMonitor
-
getSectionTicks
public long getSectionTicks()Description copied from interface:ProgressMonitor
Return the number of ticks. Valid afterProgressMonitor.startSection()
has been called.- Specified by:
getSectionTicks
in interfaceProgressMonitor
-
getSectionTime
public long getSectionTime()Description copied from interface:ProgressMonitor
Return the elapsed section time taken.- Specified by:
getSectionTime
in interfaceProgressMonitor
-
getLabel
- Specified by:
getLabel
in interfaceProgressMonitor
-
setLabel
- Specified by:
setLabel
in interfaceProgressMonitor
-