public class AsyncItemWriter<T> extends java.lang.Object implements ItemStreamWriter<java.util.concurrent.Future<T>>, org.springframework.beans.factory.InitializingBean
コンストラクターと説明 |
---|
AsyncItemWriter() |
修飾子と型 | メソッドと説明 |
---|---|
void | afterPropertiesSet() |
void | close() ストリームの動作にリソースが必要な場合、ここで破棄する必要があります。 |
void | open(ExecutionContext executionContext) 提供された ExecutionContext のストリームを開きます。 |
void | setDelegate(ItemWriter<T> delegate) |
void | update(ExecutionContext executionContext) オープン中に提供された実行コンテキストが保存されようとしていることを示します。 |
void | write(java.util.List<? extends java.util.concurrent.Future<T>> items) |
public void afterPropertiesSet() throws java.lang.Exception
org.springframework.beans.factory.InitializingBean
の afterPropertiesSet
java.lang.Exception
public void setDelegate(ItemWriter<T> delegate)
delegate
- Future 結果の実際の書き込みを行う ItemWriterpublic void write(java.util.List<? extends java.util.concurrent.Future<T>> items) throws java.lang.Exception
Future
の処理では、null は AsyncItemProcessor
の委譲された ItemProcessor
によって除外されたと見なされるため、デリゲートに渡されません。Future
のアンラップが ExecutionException
になった場合、アンラップされ、原因がスローされます。ItemWriter<java.util.concurrent.Future<T>>
の write
items
- Future
はラップ解除され、デリゲートに渡されます java.lang.Exception
- Future がスローされた場合、Future によって返される例外 public void open(ExecutionContext executionContext) throws ItemStreamException
ItemStream
ExecutionContext
のストリームを開きます。ItemStream
の open
executionContext
- 現在のステップの ExecutionContext
再起動時のステップの最後の実行からの executionContext になります。ItemStreamException
public void update(ExecutionContext executionContext) throws ItemStreamException
ItemStream
ItemStream
の update
executionContext
- 更新される ItemStreamException
public void close() throws ItemStreamException
ItemStream
ItemStream
の close
ItemStreamException