Package ca.uhn.fhir.batch2.progress
Class InstanceProgress
java.lang.Object
ca.uhn.fhir.batch2.progress.InstanceProgress
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcalculateNewStatus(boolean theLastStepIsReduction) Transitions from IN_PROGRESS/ERRORED based on chunk statuses.booleantoString()voidupdateInstance(JobInstance theInstance) voidupdateInstance(JobInstance theInstance, boolean theCalledFromReducer) Update the job instance with status information.voidupdateInstanceForReductionStep(JobInstance theInstance) Signal to the progress calculator to skip the incomplete work chunk count when determining the completed percentage.
-
Constructor Details
-
InstanceProgress
public InstanceProgress()
-
-
Method Details
-
addChunk
-
updateInstanceForReductionStep
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 2JobInstancethat we're updating
-
updateInstance
-
updateInstance
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
Transitions from IN_PROGRESS/ERRORED based on chunk statuses. -
toString
-
getNewStatus
-
hasNewStatus
-