Class InstanceProgress

java.lang.Object
ca.uhn.fhir.batch2.progress.InstanceProgress

public class InstanceProgress extends Object
  • Constructor Details

  • Method Details

    • addChunk

      public void addChunk(WorkChunk theChunk)
    • updateInstanceForReductionStep

      public void updateInstanceForReductionStep(JobInstance theInstance)
      Signal to the progress calculator to skip the incomplete work chunk count when determining the completed percentage.

      This is a hack: The reason we do this is to get around a race condition in which all work chunks are complete but the last chunk is * still in QUEUED status and will only be marked COMPLETE later.

      Parameters:
      theInstance - The Batch 2 JobInstance that we're updating
    • updateInstance

      public void updateInstance(JobInstance theInstance)
    • updateInstance

      public void updateInstance(JobInstance theInstance, boolean theCalledFromReducer)
      Update the job instance with status information. We shouldn't read any values from theInstance here -- just write.
      Parameters:
      theInstance - the instance to update with progress statistics
    • calculateNewStatus

      public void calculateNewStatus(boolean theLastStepIsReduction)
      Transitions from IN_PROGRESS/ERRORED based on chunk statuses.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNewStatus

    • hasNewStatus

      public boolean hasNewStatus()