Class TextProgressMonitor

    • Constructor Detail

      • TextProgressMonitor

        public TextProgressMonitor()
        Initialize a new progress monitor.
      • TextProgressMonitor

        public TextProgressMonitor​(Writer out)
        Initialize a new progress monitor.
        Parameters:
        out - the stream to receive messages on.
    • Method Detail

      • onUpdate

        protected void onUpdate​(String taskName,
                                int workCurr,
                                Duration duration)
        Update the progress monitor if the total work isn't known,
        Specified by:
        onUpdate in class BatchingProgressMonitor
        Parameters:
        taskName - name of the task.
        workCurr - number of units already completed.
        duration - how long this task runs
      • onEndTask

        protected void onEndTask​(String taskName,
                                 int workCurr,
                                 Duration duration)
        Finish the progress monitor when the total wasn't known in advance.
        Specified by:
        onEndTask in class BatchingProgressMonitor
        Parameters:
        taskName - name of the task.
        workCurr - total number of units processed.
        duration - how long this task runs
      • onUpdate

        protected void onUpdate​(String taskName,
                                int cmp,
                                int totalWork,
                                int pcnt,
                                Duration duration)
        Update the progress monitor when the total is known in advance.
        Specified by:
        onUpdate in class BatchingProgressMonitor
        Parameters:
        taskName - name of the task.
        cmp - number of units already completed.
        totalWork - estimated number of units to process.
        pcnt - workCurr * 100 / workTotal.
        duration - how long this task runs
      • onEndTask

        protected void onEndTask​(String taskName,
                                 int cmp,
                                 int totalWork,
                                 int pcnt,
                                 Duration duration)
        Finish the progress monitor when the total is known in advance.
        Specified by:
        onEndTask in class BatchingProgressMonitor
        Parameters:
        taskName - name of the task.
        cmp - total number of units processed.
        totalWork - estimated number of units to process.
        pcnt - workCurr * 100 / workTotal.
        duration - duration of the task