クラス AsyncItemWriter<T>

java.lang.ObjectSE
org.springframework.batch.integration.async.AsyncItemWriter<T>
実装されているすべてのインターフェース:
ItemStreamItemStreamWriter<FutureSE<T>>ItemWriter<FutureSE<T>>org.springframework.beans.factory.InitializingBean

public class AsyncItemWriter<T> extends ObjectSE implements ItemStreamWriter<FutureSE<T>>, org.springframework.beans.factory.InitializingBean
  • コンストラクターの詳細

    • AsyncItemWriter

      public AsyncItemWriter()
  • メソッドの詳細

    • afterPropertiesSet

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

      public void setDelegate(ItemWriter<T> delegate)
      パラメーター:
      delegate - Future 結果の実際の書き込みを行う ItemWriter
    • write

      public void write(Chunk<? extends FutureSE<T>> items) throws ExceptionSE
      渡された FutureSE の処理では、NULL はデリゲートに渡されません。これは、NULL が AsyncItemProcessor の委譲された ItemProcessor によって除外されたと見なされるためです。FutureSE のラップ解除の結果が ExecutionExceptionSE になる場合、ラップ解除され、原因がスローされます。
      次で指定:
      インターフェース ItemWriter<T>write 
      パラメーター:
      items - アンラップされてデリゲートに渡される FutureSE s
      例外:
      ExceptionSE - Future がスローされた場合、Future によって返される例外
    • open

      public void open(ExecutionContext executionContext) throws ItemStreamException
      インターフェースからコピーされた説明: ItemStream
      提供された ExecutionContext のストリームを開きます。
      次で指定:
      インターフェース ItemStreamopen 
      パラメーター:
      executionContext - 現在のステップの ExecutionContext。再起動時のステップの最後の実行からの executionContext になります。
      例外:
      ItemStreamException
    • update

      public void update(ExecutionContext executionContext) throws ItemStreamException
      インターフェースからコピーされた説明: ItemStream
      オープン中に提供された実行コンテキストが保存されようとしていることを示します。状態が残っているが、コンテキストに入れられていない場合は、ここに追加する必要があります。
      次で指定:
      インターフェース ItemStreamupdate 
      パラメーター:
      executionContext - 更新される
      例外:
      ItemStreamException
    • close

      public void close() throws ItemStreamException
      インターフェースからコピーされた説明: ItemStream
      ストリームの動作にリソースが必要な場合、ここで破棄する必要があります。このメソッドが呼び出されると、他のすべてのメソッド(open を除く)は例外をスローする場合があります。
      次で指定:
      インターフェース ItemStreamclose 
      例外:
      ItemStreamException