Package org.eclipse.jgit.lib
Class BatchingProgressMonitor.Task
- java.lang.Object
-
- org.eclipse.jgit.lib.BatchingProgressMonitor.Task
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- BatchingProgressMonitor
private static class BatchingProgressMonitor.Task extends java.lang.Object implements java.lang.Runnable
-
-
Field Summary
Fields Modifier and Type Field Description private booleandisplayTrue when timer expires and output should occur on next update.private intlastPercentPercentage oftotalWorkthat is done.private intlastWorkNumber of work units already completed.private booleanoutputTrue if the task has displayed anything.private java.lang.StringtaskNameTitle of the current task.private java.util.concurrent.Future<?>timerFutureScheduled timer, supporting cancellation if task ends early.private inttotalWorkNumber of work units, orProgressMonitor.UNKNOWN.
-
Constructor Summary
Constructors Constructor Description Task(java.lang.String taskName, int totalWork)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voiddelay(long time, java.util.concurrent.TimeUnit unit)(package private) voidend(BatchingProgressMonitor pm)private voidrestartTimer()voidrun()(package private) voidupdate(BatchingProgressMonitor pm, int completed)
-
-
-
Field Detail
-
taskName
private final java.lang.String taskName
Title of the current task.
-
totalWork
private final int totalWork
Number of work units, orProgressMonitor.UNKNOWN.
-
display
private volatile boolean display
True when timer expires and output should occur on next update.
-
timerFuture
private java.util.concurrent.Future<?> timerFuture
Scheduled timer, supporting cancellation if task ends early.
-
output
private boolean output
True if the task has displayed anything.
-
lastWork
private int lastWork
Number of work units already completed.
-
lastPercent
private int lastPercent
Percentage oftotalWorkthat is done.
-
-
Method Detail
-
delay
void delay(long time, java.util.concurrent.TimeUnit unit)
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
update
void update(BatchingProgressMonitor pm, int completed)
-
restartTimer
private void restartTimer()
-
end
void end(BatchingProgressMonitor pm)
-
-