Package ca.uhn.fhir.batch2.coordinator
Class WorkChunkProcessor
java.lang.Object
ca.uhn.fhir.batch2.coordinator.WorkChunkProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThis retry only works if your channel producer supports retries on message processing exceptions. -
Constructor Summary
ConstructorsConstructorDescriptionWorkChunkProcessor(IJobPersistence theJobPersistence, BatchJobSender theSender, IHapiTransactionService theHapiTransactionService) -
Method Summary
Modifier and TypeMethodDescription<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, WorkChunk theWorkChunk) Execute the work chunk.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.
-
Field Details
-
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
-
WorkChunkProcessor
public WorkChunkProcessor(IJobPersistence theJobPersistence, BatchJobSender theSender, IHapiTransactionService theHapiTransactionService)
-
-
Method Details
-
doExecution
public <PT extends ca.uhn.fhir.model.api.IModelJson,IT extends ca.uhn.fhir.model.api.IModelJson, JobStepExecutorOutput<PT,OT extends ca.uhn.fhir.model.api.IModelJson> IT, doExecutionOT> (JobWorkCursor<PT, IT, OT> theCursor, JobInstance theInstance, @Nullable WorkChunk theWorkChunk) Execute the work chunk.- Type Parameters:
PT- - Job parameters TypeIT- - Step input parameters TypeOT- - Step output parameters Type- Parameters:
theCursor- - work cursortheInstance- - the job instancetheWorkChunk- - 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, ca.uhn.fhir.batch2.coordinator.BaseDataSink<PT,OT extends ca.uhn.fhir.model.api.IModelJson> IT, getDataSinkOT> (JobWorkCursor<PT, IT, OT> theCursor, JobDefinition<PT> theJobDefinition, String theInstanceId) Get the correct datasink for the cursor/job provided.
-