クラス AbstractStep

java.lang.ObjectSE
org.springframework.batch.core.step.AbstractStep
実装されたすべてのインターフェース:
Steporg.springframework.beans.factory.Awareorg.springframework.beans.factory.BeanNameAwareorg.springframework.beans.factory.InitializingBean
既知の直属サブクラス
DelegateStepFlowStepJobStepPartitionStepTaskletStep

public abstract class AbstractStep extends ObjectSE implements Step, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanNameAware
リスナーの登録や呼び出しなど、サブクラスに共通の動作を提供する Step 実装。
作成者:
Dave Syer, Ben Hale, Robert Kasanicky, Michael Minella, Chris Schaefer, Mahmoud Ben Hassine
  • コンストラクターの詳細

    • AbstractStep

      public AbstractStep()
      デフォルトコンストラクター。
    • AbstractStep

      public AbstractStep(StringSE name)
      name プロパティのみを設定するための便利なコンストラクター。
      パラメーター:
      name - ステップの名前
  • メソッドの詳細

    • afterPropertiesSet

      public void afterPropertiesSet() throws ExceptionSE
      次で指定:
      インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
      例外:
      ExceptionSE
    • getName

      public StringSE getName()
      次で指定:
      インターフェース StepgetName 
      戻り値:
      このステップの名前。
    • setName

      public void setName(StringSE name)
      name プロパティを設定します。このオブジェクトが Spring Bean の場合、常にデフォルト値をオーバーライドします。
      パラメーター:
      name - Step の名前。
      関連事項:
    • setBeanName

      public void setBeanName(StringSE name)
      name プロパティがまだ設定されていない場合は設定します。Spring コンテナー内のコールバックの順序のため、name プロパティが存在する場合は、最初に設定されます。Bean 定義の継承には注意が必要です。親 Bean に名前がある場合、その子にも明示的な名前が必要です。そうでない場合、一意ではありません。
      次で指定:
      インターフェース org.springframework.beans.factory.BeanNameAwaresetBeanName 
      関連事項:
      • BeanNameAware.setBeanName(java.lang.String)
    • getStartLimit

      public int getStartLimit()
      次で指定:
      インターフェース StepgetStartLimit 
      戻り値:
      同じジョブインスタンスに対してステップを (再) 開始できる回数。デフォルトは Integer.MAX_VALUE
    • setStartLimit

      public void setStartLimit(int startLimit)
      startLimit 用のパブリック setter。
      パラメーター:
      startLimit - 設定する startLimit
    • isAllowStartIfComplete

      public boolean isAllowStartIfComplete()
      次で指定:
      インターフェース StepisAllowStartIfComplete 
      戻り値:
      true は、すでに完了としてマークされているステップを再度開始できる場合。デフォルトは false です。
    • setAllowStartIfComplete

      public void setAllowStartIfComplete(boolean allowStartIfComplete)
      ステップがすでに完了している場合にステップを再開するかどうかを決定するフラグのパブリック setter。デフォルトは false です。
      パラメーター:
      allowStartIfComplete - 設定するフラグの値
    • doExecute

      protected abstract void doExecute(StepExecution stepExecution) throws ExceptionSE
      ビジネスロジックを実行するサブクラスの拡張ポイント。サブクラスは、戻る前に StepExecutionExitStatus を設定する必要があります。
      パラメーター:
      stepExecution - 現在のステップのコンテキスト
      例外:
      ExceptionSE - 実装によってスローされたチェック済み例外
    • open

      protected void open(ExecutionContext ctx) throws ExceptionSE
      ステップを開始するときにサブクラスがコラボレーターにコールバックを提供し、リソースを開いたり取得したりするための拡張ポイント。デフォルトでは何もしません。
      パラメーター:
      ctx - 使用する ExecutionContext
      例外:
      ExceptionSE - 実装によってスローされたチェック済み例外
    • close

      protected void close(ExecutionContext ctx) throws ExceptionSE
      リソースを閉じるか解放するために、ステップの最後(finally ブロックの最後)でコラボレーターにコールバックを提供するサブクラスの拡張ポイント。デフォルトでは何もしません。
      パラメーター:
      ctx - 使用する ExecutionContext
      例外:
      ExceptionSE - 実装によってスローされたチェック済み例外
    • execute

      public final void execute(StepExecution stepExecution) throws JobInterruptedException, UnexpectedJobExecutionException
      ステップ実行ロジックのテンプレートメソッド - リソースの初期化(open(ExecutionContext))、実行ロジック(doExecute(StepExecution))およびリソースのクローズ(close(ExecutionContext))の抽象メソッドを呼び出します。
      次で指定:
      インターフェース Stepexecute 
      パラメーター:
      stepExecution - 実行するステップを表すエンティティ。
      例外:
      JobInterruptedException - ステップが外部から中断された場合。
      UnexpectedJobExecutionException
    • doExecutionRelease

      protected void doExecutionRelease()
      最新の StepExecution をリリース
    • doExecutionRegistration

      protected void doExecutionRegistration(StepExecution stepExecution)
      StepScope によるプロパティ解決のために StepExecution を登録します
      パラメーター:
      stepExecution - StepScoped Bean を水和するときに使用する StepExecution
    • registerStepExecutionListener

      public void registerStepExecutionListener(StepExecutionListener listener)
      ステップ実行の適切な段階で、コールバックのステップリスナーを登録します。
      パラメーター:
      listener - StepExecutionListener
    • setStepExecutionListeners

      public void setStepExecutionListeners(StepExecutionListener[] listeners)
      各オブジェクトをリスナーとして登録します。
      パラメーター:
      listeners - 既知の型のリスナーオブジェクトの配列。
    • getCompositeListener

      protected StepExecutionListener getCompositeListener()
      戻り値:
      登録されたすべてのリスナーに委譲する複合リスナー。
    • setJobRepository

      public void setJobRepository(JobRepository jobRepository)
      JobRepository のパブリック setter。
      パラメーター:
      jobRepository - 必須の依存関係です(デフォルトなし)。
    • getJobRepository

      protected JobRepository getJobRepository()
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString 
    • setObservationConvention

      public void setObservationConvention(BatchStepObservationConvention observationConvention)
    • setObservationRegistry

      public void setObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry)
    • setMeterRegistry

      public void setMeterRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry)