クラス AbstractStep

java.lang.ObjectSE
org.springframework.batch.core.step.AbstractStep
実装済みのインターフェース一覧:
Step, StoppableStep, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
既知の直属サブクラス
ChunkOrientedStep, FlowStep, JobStep, PartitionStep, RemoteStep, TaskletStep

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

    • observationRegistry

      protected io.micrometer.observation.ObservationRegistry observationRegistry
  • コンストラクターの詳細

    • AbstractStep

      @DeprecatedSE(since="6.0", forRemoval=true) public AbstractStep()
      非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。
      7.0 で削除のため 6.0 以降。代わりに AbstractStep(JobRepository) を使用してください。
      新しい AbstractStep を作成します。
    • AbstractStep

      @DeprecatedSE(since="6.0", forRemoval=true) public AbstractStep(StringSE name)
      非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。
      7.0 で削除のため 6.0 以降。代わりに AbstractStep(JobRepository) を使用してください。
      新しい AbstractStep を作成します。
    • AbstractStep

      public AbstractStep(JobRepository jobRepository)
      指定されたジョブリポジトリを使用して新しい AbstractStep を作成します。
      パラメーター:
      jobRepository - ジョブリポジトリ。null にすることはできません。
      導入:
      6.0
  • 方法の詳細

    • afterPropertiesSet

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

      public StringSE getName()
      インターフェースからコピーされた説明: Step
      ステップ名。これは異なるステップを区別するために使用され、ジョブ内で一意である必要があります。明示的に設定されていない場合、名前はデフォルトで完全修飾クラス名になります。
      次で指定:
      インターフェース Step 内の getName 
      戻り値:
      ステップの名前 (決して null ではない)
    • 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.BeanNameAware 内の setBeanName 
      関連事項:
      • BeanNameAware.setBeanName(java.lang.String)
    • getStartLimit

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

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

      public boolean isAllowStartIfComplete()
      次で指定:
      インターフェース Step 内の isAllowStartIfComplete 
      戻り値:
      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))の抽象メソッドを呼び出します。
      次で指定:
      インターフェース Step 内の execute 
      パラメーター:
      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 
    • setObservationRegistry

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