Package ca.uhn.fhir.batch2.api
Interface IJobStepWorker<PT extends ca.uhn.fhir.model.api.IModelJson,IT extends ca.uhn.fhir.model.api.IModelJson,OT extends ca.uhn.fhir.model.api.IModelJson>
- Type Parameters:
PT- The job parameters type datatypeIT- The step input datatypeOT- The step output datatype
- All Known Subinterfaces:
IFirstJobStepWorker<PT,,OT> ILastJobStepWorker<PT,,IT> IReductionStepWorker<PT,IT, OT>
- All Known Implementing Classes:
GenerateRangeChunksStep,LoadIdsStep,ResourceIdListStep
public interface IJobStepWorker<PT extends ca.uhn.fhir.model.api.IModelJson,IT extends ca.uhn.fhir.model.api.IModelJson,OT extends ca.uhn.fhir.model.api.IModelJson>
This interface is implemented by step workers within the Batch2 framework. It will be called
0..* times depending on the number of work chunks produced by the previous step. It will
always be called once in the case of the first step. It can produce 0..* work chunks that
will be processed in subsequent steps.
-
Method Summary
Modifier and TypeMethodDescriptionrun(StepExecutionDetails<PT, IT> theStepExecutionDetails, IJobDataSink<OT> theDataSink) Executes a step
-
Method Details
-
run
@Nonnull RunOutcome run(@Nonnull StepExecutionDetails<PT, IT> theStepExecutionDetails, @Nonnull IJobDataSink<OT> theDataSink) throws JobExecutionFailedExceptionExecutes a step- Parameters:
theStepExecutionDetails- Contains details about the individual executiontheDataSink- A data sink for data produced during this step. This may never be used during the final step of a job.- Returns:
- Returns a
RunOutcomecontaining details about the execution. See the javadoc for that class for details about how to populate it. - Throws:
JobExecutionFailedException- This exception indicates an unrecoverable failure. If a step worker throws this exception, processing for the job will be aborted.
-