Class MergeProgressTextReporter

java.lang.Object
com.deltaxml.mergecommon.MergeProgressTextReporter
All Implemented Interfaces:
MergeProgressListener

public class MergeProgressTextReporter extends Object implements MergeProgressListener
Reports merge progress to System.err using textual messages. Each line of the 'progress report' indicates the completion of a pipeline stage (start events are not reported). The report can include timing information and information to identify filters and other pipeline stages. The report can also be set to include the other 'incidental' messages, which are: the initial filter size message; the start filter step messages; the subchain entry and exit messages; and the skipped disabled step or subchain messages.
Author:
Tejas Barhate
  • Constructor Details

    • MergeProgressTextReporter

      public MergeProgressTextReporter()
      Default constructor.
    • MergeProgressTextReporter

      public MergeProgressTextReporter(boolean reportRunTimes)
      Constructor allowing one to specify whether the returned instance should report run times.
      Parameters:
      reportRunTimes - Set to true to report the run times.
  • Method Details

    • setReportTimes

      public void setReportTimes(boolean reportTimes)
      Controls whether timing information is reported.
      Parameters:
      reportTimes - when true timing information is reported where available
    • setReportIncidentals

      public void setReportIncidentals(boolean reportTimes)
      Set report incidentals. Here, the incidental messages are: the initial filter size message; the start filter step messages; the subchain entry and exit messages; and the skipped disabled step or subchain messages.
      Parameters:
      reportTimes - when true timing information is reported where available
    • stages

      public void stages(int enabledStages)
      Report the number of enabled stages.
      Specified by:
      stages in interface MergeProgressListener
      Parameters:
      enabledStages - The number of enabled stages.
    • started

      public void started(int stagesStarted, int stagesCompleted, String stageDescription)
      Reports when a stage has started.
      Specified by:
      started in interface MergeProgressListener
      Parameters:
      stagesStarted - Number of stages started
      stagesCompleted - Number of stages finished
      stageDescription - Description of the stage started
    • completed

      public void completed(int stagesStarted, int stagesCompleted, String stageDescription, long elapsedTime, long cpuTime)
      Reports when a stage has finished.
      Specified by:
      completed in interface MergeProgressListener
      Parameters:
      stagesStarted - Number of stages started
      stagesCompleted - Number of stages completed
      stageDescription - Description of the stage finished
      elapsedTime - The elapsed time taken to execute this stage (in nanoseconds).
      cpuTime - The CPU time taken to execute this stage (in nanoseconds).
    • reportSetAncestorStart

      public void reportSetAncestorStart(String ancestorVersion)
      Reports when the set ancestor operation has started. Please note that this event will only be reported by the concurrent merge.
      Specified by:
      reportSetAncestorStart in interface MergeProgressListener
      Parameters:
      ancestorVersion - The name of the ancestor version.
    • reportSetAncestorFinish

      public void reportSetAncestorFinish(String ancestorVersion, long elapsedTime, long cpuTime)
      Reports when the set ancestor operation has completed. Please note that this event will only be reported by the concurrent merge.
      Specified by:
      reportSetAncestorFinish in interface MergeProgressListener
      Parameters:
      ancestorVersion - The name of the ancestor version.
      elapsedTime - The elapsed time taken to execute the set ancestor stage (in nanoseconds).
      cpuTime - The CPU time taken to execute the set ancestor stage (in nanoseconds).
    • reportAddVersionStart

      public void reportAddVersionStart(String version)
      Reports when the add version operation has started.
      Specified by:
      reportAddVersionStart in interface MergeProgressListener
      Parameters:
      version - The name of the version.
    • reportAddVersionFinish

      public void reportAddVersionFinish(String version, long elapsedTime, long cpuTime)
      Reports when the add version operation has completed.
      Specified by:
      reportAddVersionFinish in interface MergeProgressListener
      Parameters:
      version - The name of the version.
      elapsedTime - The elapsed time taken to execute this add version stage (in nanoseconds).
      cpuTime - The CPU time taken to execute this add version stage (in nanoseconds).
    • reportExtractAllStart

      public void reportExtractAllStart()
      Reports when the extract all operation has started.
      Specified by:
      reportExtractAllStart in interface MergeProgressListener
    • reportExtractAllFinish

      public void reportExtractAllFinish(long elapsedTime, long cpuTime)
      Reports when the extract all operation has completed.
      Specified by:
      reportExtractAllFinish in interface MergeProgressListener
      Parameters:
      elapsedTime - The elapsed time taken to execute the extract all stage (in nanoseconds).
      cpuTime - The CPU time taken to execute the extract all stage (in nanoseconds).