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

public final Class StrictWorkMonitor

extends Object
implements ProgressMonitor
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.lib.ProgressMonitor
Static Imports
org.junit.Assert.assertEquals

Strict work monitor

Field Summary

Modifier and TypeField and Description
private int
private int

Constructor Summary

AccessConstructor and Description
public

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.
total
)

Implements org.eclipse.jgit.lib.ProgressMonitor.beginTask.

Begin processing a single task.

public void
endTask()

Implements org.eclipse.jgit.lib.ProgressMonitor.endTask.

Finish the current task, so the next can begin.

public boolean
isCancelled()

Implements org.eclipse.jgit.lib.ProgressMonitor.isCancelled.

Check for user task cancellation.

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

Implements org.eclipse.jgit.lib.ProgressMonitor.showDuration.

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
)

Implements org.eclipse.jgit.lib.ProgressMonitor.start.

Advise the monitor of the total number of subtasks.

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

Implements org.eclipse.jgit.lib.ProgressMonitor.update.

Denote that some work units have been completed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lastWorkback to summary
private int lastWork
totalWorkback to summary
private int totalWork

Constructor Detail

StrictWorkMonitorback to summary
public StrictWorkMonitor()

Method Detail

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

Implements org.eclipse.jgit.lib.ProgressMonitor.beginTask.

Doc from org.eclipse.jgit.lib.ProgressMonitor.beginTask.

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.

total:int

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

Annotations
@Override
endTaskback to summary
public void endTask()

Implements org.eclipse.jgit.lib.ProgressMonitor.endTask.

Doc from org.eclipse.jgit.lib.ProgressMonitor.endTask.

Finish the current task, so the next can begin.

Annotations
@Override
isCancelledback to summary
public boolean isCancelled()

Implements org.eclipse.jgit.lib.ProgressMonitor.isCancelled.

Doc from org.eclipse.jgit.lib.ProgressMonitor.isCancelled.

Check for user task cancellation.

Returns:boolean

true if the user asked the process to stop working.

Annotations
@Override
showDurationback to summary
public void showDuration(boolean enabled)

Implements org.eclipse.jgit.lib.ProgressMonitor.showDuration.

Doc from org.eclipse.jgit.lib.ProgressMonitor.showDuration.

Set whether the monitor should show elapsed time per task

Parameters
enabled:boolean

whether to show elapsed time per task

Annotations
@Override
startback to summary
public void start(int totalTasks)

Implements org.eclipse.jgit.lib.ProgressMonitor.start.

Doc from org.eclipse.jgit.lib.ProgressMonitor.start.

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.

Annotations
@Override
updateback to summary
public void update(int completed)

Implements org.eclipse.jgit.lib.ProgressMonitor.update.

Doc from org.eclipse.jgit.lib.ProgressMonitor.update.

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.

Annotations
@Override