private static class BatchingProgressMonitor.Task
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private boolean |
display
True when timer expires and output should occur on next update.
|
private int |
lastPercent
Percentage of
totalWork that is done. |
private int |
lastWork
Number of work units already completed.
|
private boolean |
output
True if the task has displayed anything.
|
private java.lang.String |
taskName
Title of the current task.
|
private java.util.concurrent.Future<?> |
timerFuture
Scheduled timer, supporting cancellation if task ends early.
|
private int |
totalWork
Number of work units, or
ProgressMonitor.UNKNOWN . |
Constructor and Description |
---|
Task(java.lang.String taskName,
int totalWork) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
delay(long time,
java.util.concurrent.TimeUnit unit) |
(package private) void |
end(BatchingProgressMonitor pm) |
private void |
restartTimer() |
void |
run() |
(package private) void |
update(BatchingProgressMonitor pm,
int completed) |
private final java.lang.String taskName
private final int totalWork
ProgressMonitor.UNKNOWN
.private volatile boolean display
private java.util.concurrent.Future<?> timerFuture
private boolean output
private int lastWork
private int lastPercent
totalWork
that is done.void delay(long time, java.util.concurrent.TimeUnit unit)
public void run()
run
in interface java.lang.Runnable
void update(BatchingProgressMonitor pm, int completed)
private void restartTimer()
void end(BatchingProgressMonitor pm)