Class StepBuilderHelper<B extends StepBuilderHelper<B>>

java.lang.Object
org.springframework.batch.core.step.builder.StepBuilderHelper<B>
Direct Known Subclasses:
AbstractTaskletStepBuilder, FlowStepBuilder, JobStepBuilder, PartitionStepBuilder, StepBuilder

public abstract class StepBuilderHelper<B extends StepBuilderHelper<B>> extends Object
A base class and utility for other step builders providing access to common properties like job repository and listeners.
Since:
2.2
Author:
Dave Syer, Michael Minella, Taeik Lim, Mahmoud Ben Hassine
  • Field Details

  • Constructor Details

    • StepBuilderHelper

      @Deprecated(since="5.1", forRemoval=true) public StepBuilderHelper(String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new StepBuilderHelper.
      Parameters:
      name - the step name
    • StepBuilderHelper

      public StepBuilderHelper(String name, JobRepository jobRepository)
      Create a new StepBuilderHelper.
      Parameters:
      name - the step name
      jobRepository - the job repository
      Since:
      5.1
    • StepBuilderHelper

      protected StepBuilderHelper(StepBuilderHelper<?> parent)
      Create a new builder initialized with any properties in the parent. The parent is copied, so it can be re-used.
      Parameters:
      parent - a parent helper containing common step properties
  • Method Details

    • repository

      @Deprecated(since="5.1", forRemoval=true) public B repository(JobRepository jobRepository)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the job repository
      Parameters:
      jobRepository - the repository to set
      Returns:
      this to enable fluent chaining
    • observationConvention

      public B observationConvention(BatchStepObservationConvention observationConvention)
      Sets the step observation convention.
      Parameters:
      observationConvention - the step observation convention (optional)
      Returns:
      this to enable fluent chaining
      Since:
      5.1
    • observationRegistry

      public B observationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry)
    • meterRegistry

      public B meterRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry)
    • startLimit

      public B startLimit(int startLimit)
    • listener

      public B listener(Object listener)
      Registers objects using the annotation based listener configuration.
      Parameters:
      listener - the object that has a method configured with listener annotation
      Returns:
      this for fluent chaining
    • listener

      public B listener(StepExecutionListener listener)
    • allowStartIfComplete

      public B allowStartIfComplete(boolean allowStartIfComplete)
    • self

      protected abstract B self()
    • getName

      protected String getName()
    • getJobRepository

      protected JobRepository getJobRepository()
    • isAllowStartIfComplete

      protected boolean isAllowStartIfComplete()
    • enhance

      protected void enhance(AbstractStep step)