Top Description Fields Methods
org.eclipse.jgit.lib

public Interface ProgressMonitor

Known Direct Implementers
org.eclipse.jgit.lib.BatchingProgressMonitor, org.eclipse.jgit.lib.EmptyProgressMonitor, org.eclipse.jgit.lib.NullProgressMonitor, org.eclipse.jgit.lib.ThreadSafeProgressMonitor

A progress reporting interface.

Field Summary

Modifier and TypeField and Description
public static final int
UNKNOWN

Constant indicating the total work units cannot be predicted.

Method Summary

Modifier and TypeMethod and Description
public void
beginTask(String
title to describe the task. Callers should publish these as stable string constants that implementations could match against for translation support.
title
,
int
total number of work units the application will perform; UNKNOWN if it cannot be predicted in advance.
totalWork
)

Begin processing a single task.

public void
endTask()

Finish the current task, so the next can begin.

public boolean

Returns:

true if the user asked the process to stop working.
isCancelled
()

Check for user task cancellation.

public void
showDuration(boolean
whether to show elapsed time per task
enabled
)

Set whether the monitor should show elapsed time per task

public void
start(int
the total number of tasks the caller will need to complete their processing.
totalTasks
)

Advise the monitor of the total number of subtasks.

public void
update(int
the number of work units completed since the last call.
completed
)

Denote that some work units have been completed.

Field Detail

UNKNOWNback to summary
public static final int UNKNOWN

Constant indicating the total work units cannot be predicted.

Method Detail

beginTaskback to summary
public void beginTask(String title, int totalWork)

Begin processing a single task.

Parameters
title:String

title to describe the task. Callers should publish these as stable string constants that implementations could match against for translation support.

totalWork:int

total number of work units the application will perform; UNKNOWN if it cannot be predicted in advance.

endTaskback to summary
public void endTask()

Finish the current task, so the next can begin.

isCancelledback to summary
public boolean isCancelled()

Check for user task cancellation.

Returns:boolean

true if the user asked the process to stop working.

showDurationback to summary
public void showDuration(boolean enabled)

Set whether the monitor should show elapsed time per task

Parameters
enabled:boolean

whether to show elapsed time per task

Since
6.5
startback to summary
public void start(int totalTasks)

Advise the monitor of the total number of subtasks.

This should be invoked at most once per progress monitor interface.

Parameters
totalTasks:int

the total number of tasks the caller will need to complete their processing.

updateback to summary
public void update(int completed)

Denote that some work units have been completed.

This is an incremental update; if invoked once per work unit the correct value for our argument is 1, to indicate a single unit of work has been finished by the caller.

Parameters
completed:int

the number of work units completed since the last call.