Package org.eclipse.jgit.lib
Class TextProgressMonitor
- java.lang.Object
-
- org.eclipse.jgit.lib.BatchingProgressMonitor
-
- org.eclipse.jgit.lib.TextProgressMonitor
-
- All Implemented Interfaces:
ProgressMonitor
public class TextProgressMonitor extends BatchingProgressMonitor
A simple progress reporter printing on a stream.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.jgit.lib.ProgressMonitor
UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description TextProgressMonitor()
Initialize a new progress monitor.TextProgressMonitor(Writer out)
Initialize a new progress monitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
onEndTask(String taskName, int workCurr)
Finish the progress monitor when the total wasn't known in advance.protected void
onEndTask(String taskName, int cmp, int totalWork, int pcnt)
Finish the progress monitor when the total is known in advance.protected void
onUpdate(String taskName, int workCurr)
Update the progress monitor if the total work isn't known,protected void
onUpdate(String taskName, int cmp, int totalWork, int pcnt)
Update the progress monitor when the total is known in advance.-
Methods inherited from class org.eclipse.jgit.lib.BatchingProgressMonitor
beginTask, endTask, isCancelled, setDelayStart, start, update
-
-
-
-
Constructor Detail
-
TextProgressMonitor
public TextProgressMonitor()
Initialize a new progress monitor.
-
TextProgressMonitor
public TextProgressMonitor(Writer out)
Initialize a new progress monitor.- Parameters:
out
- the stream to receive messages on.
-
-
Method Detail
-
onUpdate
protected void onUpdate(String taskName, int workCurr)
Update the progress monitor if the total work isn't known,- Specified by:
onUpdate
in classBatchingProgressMonitor
- Parameters:
taskName
- name of the task.workCurr
- number of units already completed.
-
onEndTask
protected void onEndTask(String taskName, int workCurr)
Finish the progress monitor when the total wasn't known in advance.- Specified by:
onEndTask
in classBatchingProgressMonitor
- Parameters:
taskName
- name of the task.workCurr
- total number of units processed.
-
onUpdate
protected void onUpdate(String taskName, int cmp, int totalWork, int pcnt)
Update the progress monitor when the total is known in advance.- Specified by:
onUpdate
in classBatchingProgressMonitor
- Parameters:
taskName
- name of the task.cmp
- number of units already completed.totalWork
- estimated number of units to process.pcnt
-workCurr * 100 / workTotal
.
-
onEndTask
protected void onEndTask(String taskName, int cmp, int totalWork, int pcnt)
Finish the progress monitor when the total is known in advance.- Specified by:
onEndTask
in classBatchingProgressMonitor
- Parameters:
taskName
- name of the task.cmp
- total number of units processed.totalWork
- estimated number of units to process.pcnt
-workCurr * 100 / workTotal
.
-
-