Class MultiProgressMonitor.VolatileTask

java.lang.Object
com.google.gerrit.server.git.MultiProgressMonitor.Task
com.google.gerrit.server.git.MultiProgressMonitor.VolatileTask
All Implemented Interfaces:
org.eclipse.jgit.lib.ProgressMonitor
Enclosing class:
MultiProgressMonitor

public class MultiProgressMonitor.VolatileTask extends MultiProgressMonitor.Task
Handle for a sub-task whose total work can be updated while the task is in progress.
  • Field Details

  • Constructor Details

    • VolatileTask

      public VolatileTask(String subTaskName)
  • Method Details

    • updateTotal

      public void updateTotal(int workUnits)
      Update the total work for this sub-task.

      Intended to be called from a worker thread.

      Parameters:
      workUnits - number of work units to be added to existing total work.
    • finalizeTotal

      public void finalizeTotal()
      Mark the total on this sub-task as unmodifiable.

      Intended to be called from a worker thread.

    • getTotal

      public int getTotal()
      Overrides:
      getTotal in class MultiProgressMonitor.Task
    • getTotalDisplay

      public String getTotalDisplay(int total)
      Overrides:
      getTotalDisplay in class MultiProgressMonitor.Task