public class CompositeItemWriter<T> extends java.lang.Object implements ItemStreamWriter<T>, org.springframework.beans.factory.InitializingBean
ItemWriters in fixed-order sequence.| Constructor and Description |
|---|
CompositeItemWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
close()
If any resources are needed for the stream to operate they need to be destroyed here.
|
void |
open(ExecutionContext executionContext)
Open the stream for the provided
ExecutionContext. |
void |
setDelegates(java.util.List<ItemWriter<? super T>> delegates) |
void |
setIgnoreItemStream(boolean ignoreItemStream) |
void |
update(ExecutionContext executionContext)
Indicates that the execution context provided during open is about to be saved.
|
void |
write(java.util.List<? extends T> item)
Process the supplied data element.
|
public void setIgnoreItemStream(boolean ignoreItemStream)
public void write(java.util.List<? extends T> item) throws java.lang.Exception
ItemWriterwrite in interface ItemWriter<T>item - items to be writtenjava.lang.Exception - if there are errors. The framework will catch the
exception and convert or rethrow it as appropriate.public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic void setDelegates(java.util.List<ItemWriter<? super T>> delegates)
public void close()
throws ItemStreamException
ItemStreamclose in interface ItemStreamItemStreamExceptionpublic void open(ExecutionContext executionContext) throws ItemStreamException
ItemStreamExecutionContext.open in interface ItemStreamexecutionContext - current step's ExecutionContext. Will be the
executionContext from the last run of the step on a restart.ItemStreamExceptionpublic void update(ExecutionContext executionContext) throws ItemStreamException
ItemStreamupdate in interface ItemStreamexecutionContext - to be updatedItemStreamException