Class AsyncItemWriter<T>
java.lang.Object
org.springframework.batch.integration.async.AsyncItemWriter<T>
- All Implemented Interfaces:
org.springframework.batch.item.ItemStream,org.springframework.batch.item.ItemStreamWriter<Future<T>>,org.springframework.batch.item.ItemWriter<Future<T>>,org.springframework.beans.factory.InitializingBean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()voidopen(org.springframework.batch.item.ExecutionContext executionContext) voidsetDelegate(org.springframework.batch.item.ItemWriter<T> delegate) voidupdate(org.springframework.batch.item.ExecutionContext executionContext) voidIn the processing of theFutures passed, nulls are not passed to the delegate since they are considered filtered out by theAsyncItemProcessor's delegatedItemProcessor.
-
Constructor Details
-
AsyncItemWriter
public AsyncItemWriter()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
setDelegate
- Parameters:
delegate- ItemWriter that does the actual writing of the Future results
-
write
In the processing of theFutures passed, nulls are not passed to the delegate since they are considered filtered out by theAsyncItemProcessor's delegatedItemProcessor. If the unwrapping of theFutureresults in anExecutionException, that will be unwrapped and the cause will be thrown. -
open
public void open(org.springframework.batch.item.ExecutionContext executionContext) throws org.springframework.batch.item.ItemStreamException - Specified by:
openin interfaceorg.springframework.batch.item.ItemStream- Throws:
org.springframework.batch.item.ItemStreamException
-
update
public void update(org.springframework.batch.item.ExecutionContext executionContext) throws org.springframework.batch.item.ItemStreamException - Specified by:
updatein interfaceorg.springframework.batch.item.ItemStream- Throws:
org.springframework.batch.item.ItemStreamException
-
close
public void close() throws org.springframework.batch.item.ItemStreamException- Specified by:
closein interfaceorg.springframework.batch.item.ItemStream- Throws:
org.springframework.batch.item.ItemStreamException
-