Package ca.uhn.fhir.batch2.coordinator
Class ReductionStepDataSink<PT extends ca.uhn.fhir.model.api.IModelJson,IT extends ca.uhn.fhir.model.api.IModelJson,OT extends ca.uhn.fhir.model.api.IModelJson>
java.lang.Object
ca.uhn.fhir.batch2.coordinator.ReductionStepDataSink<PT,IT,OT>
- All Implemented Interfaces:
IJobDataSink<OT>
public class ReductionStepDataSink<PT extends ca.uhn.fhir.model.api.IModelJson,IT extends ca.uhn.fhir.model.api.IModelJson,OT extends ca.uhn.fhir.model.api.IModelJson>
extends Object
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReductionStepDataSink(String theInstanceId, JobWorkCursor<PT, IT, OT> theJobWorkCursor, IJobPersistence thePersistence, JobDefinitionRegistry theJobDefinitionRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(WorkChunkData<OT> theData) Step workers may call this 0..* times in order to provide output work chunks that will be passed to subsequent steps.booleanintintbooleanvoidrecoveredError(String theMessage) Step workers may invoke this method to indicate that an error occurred during processing but that it was successfully recovered, or it does not need to be recovered, or at least that it does not mean that processing should stop.voidsetWarningProcessor(IWarningProcessor theWarningProcessor) Step workers may invoke this method to indicate that a warning message processorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.batch2.api.IJobDataSink
accept
-
Field Details
-
myJobDefinitionId
-
-
Constructor Details
-
ReductionStepDataSink
public ReductionStepDataSink(String theInstanceId, JobWorkCursor<PT, IT, OT> theJobWorkCursor, IJobPersistence thePersistence, JobDefinitionRegistry theJobDefinitionRegistry)
-
-
Method Details
-
accept
Description copied from interface:IJobDataSinkStep workers may call this 0..* times in order to provide output work chunks that will be passed to subsequent steps. Multiple invocations will result in multiple discrete chunks of work, each of which will be processed separately (and potentially in parallel) by the next step in the job definition.This method is not currently any different to calling
IJobDataSink.accept(IModelJson)other than the fact that it adds a wrapper object, but additional fields may be added to the wrapper in the future.This method may not be called by the final step worker and will result in an error.
- Parameters:
theData- The data to pass to the next step worker
-
getWorkChunkCount
-
getInstanceId
-
recoveredError
Description copied from interface:IJobDataSinkStep workers may invoke this method to indicate that an error occurred during processing but that it was successfully recovered, or it does not need to be recovered, or at least that it does not mean that processing should stop.- Specified by:
recoveredErrorin interfaceIJobDataSink<PT extends ca.uhn.fhir.model.api.IModelJson>- Parameters:
theMessage- An error message. This will be logged, and in the future it may be stored
-
setWarningProcessor
Description copied from interface:IJobDataSinkStep workers may invoke this method to indicate that a warning message processor- Specified by:
setWarningProcessorin interfaceIJobDataSink<PT extends ca.uhn.fhir.model.api.IModelJson>- Parameters:
theWarningProcessor- The processor for the warning.
-
getRecoveredErrorCount
public int getRecoveredErrorCount() -
getRecoveredWarning
-
firstStepProducedNothing
public boolean firstStepProducedNothing() -
hasExactlyOneChunk
public boolean hasExactlyOneChunk() -
getTargetStep
-
getJobDefinitionId
-