Top Description Fields Constructors Methods
org.eclipse.jgit.lib

public Class TextProgressMonitor

extends BatchingProgressMonitor
Class Inheritance
Static Imports
java.nio.charset.StandardCharsets.UTF_8

A simple progress reporter printing on a stream.

Field Summary

Modifier and TypeField and Description
private final Writer
private boolean

Constructor Summary

AccessConstructor and Description
public
TextProgressMonitor()

Initialize a new progress monitor.

public
TextProgressMonitor(Writer
the stream to receive messages on.
out
)

Initialize a new progress monitor.

Method Summary

Modifier and TypeMethod and Description
private void
format(StringBuilder s, String taskName, int workCurr, Duration duration)

private void
format(StringBuilder s, String taskName, int cmp, int totalWork, int pcnt, Duration duration)

protected void
onEndTask(String
name of the task.
taskName
,
int
total number of units processed.
workCurr
,
Duration
how long this task runs
duration
)

Implements abstract org.eclipse.jgit.lib.BatchingProgressMonitor.onEndTask.

Finish the progress monitor when the total wasn't known in advance.

protected void
onEndTask(String
name of the task.
taskName
,
int
total number of units processed.
cmp
,
int
estimated number of units to process.
totalWork
,
int
workCurr * 100 / workTotal.
pcnt
,
Duration
duration of the task
duration
)

Implements abstract org.eclipse.jgit.lib.BatchingProgressMonitor.onEndTask.

Finish the progress monitor when the total is known in advance.

protected void
onUpdate(String
name of the task.
taskName
,
int
number of units already completed.
workCurr
,
Duration
how long this task runs
duration
)

Implements abstract org.eclipse.jgit.lib.BatchingProgressMonitor.onUpdate.

Update the progress monitor if the total work isn't known,

protected void
onUpdate(String
name of the task.
taskName
,
int
number of units already completed.
cmp
,
int
estimated number of units to process.
totalWork
,
int
workCurr * 100 / workTotal.
pcnt
,
Duration
how long this task runs
duration
)

Implements abstract org.eclipse.jgit.lib.BatchingProgressMonitor.onUpdate.

Update the progress monitor when the total is known in advance.

private void
Inherited from org.eclipse.jgit.lib.BatchingProgressMonitor:
appendDurationbeginTaskendTaskisCancelledsetDelayStartshowDurationstartupdate

Field Detail

outback to summary
private final Writer out
writeback to summary
private boolean write

Constructor Detail

TextProgressMonitorback to summary
public TextProgressMonitor()

Initialize a new progress monitor.

TextProgressMonitorback to summary
public TextProgressMonitor(Writer out)

Initialize a new progress monitor.

Parameters
out:Writer

the stream to receive messages on.

Method Detail

formatback to summary
private void format(StringBuilder s, String taskName, int workCurr, Duration duration)
formatback to summary
private void format(StringBuilder s, String taskName, int cmp, int totalWork, int pcnt, Duration duration)
onEndTaskback to summary
protected void onEndTask(String taskName, int workCurr, Duration duration)

Implements abstract org.eclipse.jgit.lib.BatchingProgressMonitor.onEndTask.

Doc from org.eclipse.jgit.lib.BatchingProgressMonitor.onEndTask.

Finish the progress monitor when the total wasn't known in advance.

Parameters
taskName:String

name of the task.

workCurr:int

total number of units processed.

duration:Duration

how long this task runs

Annotations
@Override
onEndTaskback to summary
protected void onEndTask(String taskName, int cmp, int totalWork, int pcnt, Duration duration)

Implements abstract org.eclipse.jgit.lib.BatchingProgressMonitor.onEndTask.

Doc from org.eclipse.jgit.lib.BatchingProgressMonitor.onEndTask.

Finish the progress monitor when the total is known in advance.

Parameters
taskName:String

name of the task.

cmp:int

total number of units processed.

totalWork:int

estimated number of units to process.

pcnt:int

workCurr * 100 / workTotal.

duration:Duration

duration of the task

Annotations
@Override
onUpdateback to summary
protected void onUpdate(String taskName, int workCurr, Duration duration)

Implements abstract org.eclipse.jgit.lib.BatchingProgressMonitor.onUpdate.

Doc from org.eclipse.jgit.lib.BatchingProgressMonitor.onUpdate.

Update the progress monitor if the total work isn't known,

Parameters
taskName:String

name of the task.

workCurr:int

number of units already completed.

duration:Duration

how long this task runs

Annotations
@Override
onUpdateback to summary
protected void onUpdate(String taskName, int cmp, int totalWork, int pcnt, Duration duration)

Implements abstract org.eclipse.jgit.lib.BatchingProgressMonitor.onUpdate.

Doc from org.eclipse.jgit.lib.BatchingProgressMonitor.onUpdate.

Update the progress monitor when the total is known in advance.

Parameters
taskName:String

name of the task.

cmp:int

number of units already completed.

totalWork:int

estimated number of units to process.

pcnt:int

workCurr * 100 / workTotal.

duration:Duration

how long this task runs

Annotations
@Override
sendback to summary
private void send(StringBuilder s)