| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private TimeUnit | |
| private static boolean | |
| private Boolean | |
| private BatchingProgressMonitor. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | appendDuration(StringBuilder
StringBuilder to append the formatted duration to s, Duration duration to format duration)Append formatted duration if system property or environment variable GIT_TRACE_PERFORMANCE is set to "true". |
| 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;
work)UNKNOWN if it cannot be predicted in advance.Implements org. Begin processing a single task. |
| public void | endTask()
Implements org. Finish the current task, so the next can begin. |
| public boolean | isCancelled()
Implements org. Check for user task cancellation. |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| public void | setDelayStart(long
how long to wait before output. If 0 output begins on the
first time, TimeUnit update(int) call.time unit of unit)time.Set an optional delay before the first output. |
| public void | showDuration(boolean
whether to show elapsed time per task enabled)Implements org. Set whether the monitor should show elapsed time per task |
| private boolean | |
| public void | start(int
the total number of tasks the caller will need to complete
their processing. totalTasks)Implements org. 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. Denote that some work units have been completed. |
| delayStartTime | back to summary |
|---|---|
| private long delayStartTime | |
| delayStartUnit | back to summary |
|---|---|
| private TimeUnit delayStartUnit | |
| performanceTrace | back to summary |
|---|---|
| private static boolean performanceTrace | |
| showDuration | back to summary |
|---|---|
| private Boolean showDuration | |
| task | back to summary |
|---|---|
| private BatchingProgressMonitor. | |
| BatchingProgressMonitor | back to summary |
|---|---|
| public BatchingProgressMonitor() | |
| appendDuration | back to summary |
|---|---|
| protected void appendDuration(StringBuilder s, Duration duration) Append formatted duration if system property or environment variable GIT_TRACE_PERFORMANCE is set to "true". If both are defined the system property takes precedence.
| |
| beginTask | back to summary |
|---|---|
| public void beginTask(String title, int work) Implements org. Doc from org. Begin processing a single task.
| |
| endTask | back to summary |
|---|---|
| public void endTask() Implements org. Doc from org. Finish the current task, so the next can begin.
| |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled() Implements org. Doc from org. Check for user task cancellation.
| |
| onEndTask | back to summary |
|---|---|
| protected abstract void onEndTask(String taskName, int workCurr, Duration duration) Finish the progress monitor when the total wasn't known in advance. | |
| onEndTask | back to summary |
|---|---|
| protected abstract void onEndTask(String taskName, int workCurr, int workTotal, int percentDone, Duration duration) Finish the progress monitor when the total is known in advance. | |
| onUpdate | back to summary |
|---|---|
| protected abstract void onUpdate(String taskName, int workCurr, Duration duration) Update the progress monitor if the total work isn't known, | |
| onUpdate | back to summary |
|---|---|
| protected abstract void onUpdate(String taskName, int workCurr, int workTotal, int percentDone, Duration duration) Update the progress monitor when the total is known in advance. | |
| setDelayStart | back to summary |
|---|---|
| public void setDelayStart(long time, TimeUnit unit) Set an optional delay before the first output.
| |
| showDuration | back to summary |
|---|---|
| public void showDuration(boolean enabled) Implements org. Doc from org. Set whether the monitor should show elapsed time per task
| |
| showDuration | back to summary |
|---|---|
| private boolean showDuration() | |
| start | back to summary |
|---|---|
| public void start(int totalTasks) Implements org. Doc from org. Advise the monitor of the total number of subtasks. This should be invoked at most once per progress monitor interface.
| |
| update | back to summary |
|---|---|
| public void update(int completed) Implements org. Doc from org. 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
| |
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | display
True when timer expires and output should occur on next update. |
| private int | lastPercent
Percentage of |
| private int | lastWork
Number of work units already completed. |
| private boolean | output
True if the task has displayed anything. |
| private final Instant | |
| private final String | taskName
Title of the current task. |
| private Future | timerFuture
Scheduled timer, supporting cancellation if task ends early. |
| private final int | totalWork
Number of work units, or |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| private Duration | |
| pack-priv void | |
| private void | |
| public void | |
| pack-priv void |
| display | back to summary |
|---|---|
| private volatile boolean display True when timer expires and output should occur on next update. | |
| lastPercent | back to summary |
|---|---|
| private int lastPercent Percentage of | |
| lastWork | back to summary |
|---|---|
| private int lastWork Number of work units already completed. | |
| output | back to summary |
|---|---|
| private boolean output True if the task has displayed anything. | |
| startTime | back to summary |
|---|---|
| private final Instant startTime | |
| taskName | back to summary |
|---|---|
| private final String taskName Title of the current task. | |
| timerFuture | back to summary |
|---|---|
| private Future<?> timerFuture Scheduled timer, supporting cancellation if task ends early. | |
| totalWork | back to summary |
|---|---|
| private final int totalWork Number of work units, or | |
| Task | back to summary |
|---|---|
| pack-priv Task(String taskName, int totalWork) | |
| delay | back to summary |
|---|---|
| pack-priv void delay(long time, TimeUnit unit) | |
| elapsedTime | back to summary |
|---|---|
| private Duration elapsedTime() | |
| end | back to summary |
|---|---|
| pack-priv void end(BatchingProgressMonitor pm) | |
| restartTimer | back to summary |
|---|---|
| private void restartTimer() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| update | back to summary |
|---|---|
| pack-priv void update(BatchingProgressMonitor pm, int completed) | |