public class CompositeItemWriter<T> extends java.lang.Object implements ItemStreamWriter<T>, org.springframework.beans.factory.InitializingBean
ItemWriter
s 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
ItemWriter
write
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.InitializingBean
java.lang.Exception
public void setDelegates(java.util.List<ItemWriter<? super T>> delegates)
public void close() throws ItemStreamException
ItemStream
close
in interface ItemStream
ItemStreamException
public void open(ExecutionContext executionContext) throws ItemStreamException
ItemStream
ExecutionContext
.open
in interface ItemStream
executionContext
- current step's ExecutionContext
. Will be the
executionContext from the last run of the step on a restart.ItemStreamException
public void update(ExecutionContext executionContext) throws ItemStreamException
ItemStream
update
in interface ItemStream
executionContext
- to be updatedItemStreamException