Class ListItemWriter<T>
java.lang.Object
org.springframework.batch.infrastructure.item.support.ListItemWriter<T>
- All Implemented Interfaces:
ItemWriter<T>
Item writer that writes items to a
List.
This writer is not thread-safe.
- Author:
- mminella, Mahmoud Ben Hassine
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ListItemWriter
public ListItemWriter()
-
-
Method Details
-
write
Description copied from interface:ItemWriterProcess the supplied data element. Will not be called with any null items in normal operation but might be called with an empty chunk, for example when all items have been filtered by anItemProcessoror skipped by the fault-tolerant step processing. Implementations are expected to handle empty chunks gracefully.- Specified by:
writein interfaceItemWriter<T>- Parameters:
chunk- of items to be written. Nevernullbut may be empty.- Throws:
Exception- if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.
-
getWrittenItems
-