Class WorkChunkProcessor

java.lang.Object
ca.uhn.fhir.batch2.coordinator.WorkChunkProcessor

public class WorkChunkProcessor extends Object
  • Field Details

    • MAX_CHUNK_ERROR_COUNT

      public static final int MAX_CHUNK_ERROR_COUNT
      This retry only works if your channel producer supports retries on message processing exceptions.

      What's more, we may one day want to have this configurable by the caller. But since this is not a feature of HAPI, this has not been done yet.

      See Also:
  • Constructor Details

  • Method Details

    • doExecution

      public <PT extends ca.uhn.fhir.model.api.IModelJson, IT extends ca.uhn.fhir.model.api.IModelJson, OT extends ca.uhn.fhir.model.api.IModelJson> JobStepExecutorOutput<PT,IT,OT> doExecution(JobWorkCursor<PT,IT,OT> theCursor, JobInstance theInstance, @Nullable WorkChunk theWorkChunk)
      Execute the work chunk.
      Type Parameters:
      PT - - Job parameters Type
      IT - - Step input parameters Type
      OT - - Step output parameters Type
      Parameters:
      theCursor - - work cursor
      theInstance - - the job instance
      theWorkChunk - - the work chunk (if available); can be null (for reduction step only!)
      Returns:
      - JobStepExecution output. Contains the datasink and whether or not the execution had succeeded.
    • getDataSink

      protected <PT extends ca.uhn.fhir.model.api.IModelJson, IT extends ca.uhn.fhir.model.api.IModelJson, OT extends ca.uhn.fhir.model.api.IModelJson> ca.uhn.fhir.batch2.coordinator.BaseDataSink<PT,IT,OT> getDataSink(JobWorkCursor<PT,IT,OT> theCursor, JobDefinition<PT> theJobDefinition, String theInstanceId)
      Get the correct datasink for the cursor/job provided.