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 Details

    • myJobDefinitionId

      protected final String myJobDefinitionId
  • Constructor Details

  • Method Details

    • accept

      public void accept(WorkChunkData<OT> theData)
      Description copied from interface: IJobDataSink
      Step 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

      public int getWorkChunkCount()
    • getInstanceId

      public String getInstanceId()
    • recoveredError

      public void recoveredError(String theMessage)
      Description copied from interface: IJobDataSink
      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.
      Specified by:
      recoveredError in interface IJobDataSink<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

      public void setWarningProcessor(IWarningProcessor theWarningProcessor)
      Description copied from interface: IJobDataSink
      Step workers may invoke this method to indicate that a warning message processor
      Specified by:
      setWarningProcessor in interface IJobDataSink<PT extends ca.uhn.fhir.model.api.IModelJson>
      Parameters:
      theWarningProcessor - The processor for the warning.
    • getRecoveredErrorCount

      public int getRecoveredErrorCount()
    • getRecoveredWarning

      public String getRecoveredWarning()
    • firstStepProducedNothing

      public boolean firstStepProducedNothing()
    • hasExactlyOneChunk

      public boolean hasExactlyOneChunk()
    • getTargetStep

      public JobDefinitionStep<PT,IT,OT> getTargetStep()
    • getJobDefinitionId

      public String getJobDefinitionId()