Class MultiResourceItemWriter<T>

Type Parameters:
T - item type
All Implemented Interfaces:
ItemStream, ItemStreamWriter<T>, ItemWriter<T>

public class MultiResourceItemWriter<T> extends AbstractItemStreamItemWriter<T>
Wraps a ResourceAwareItemWriterItemStream and creates a new output resource when the count of items written in current resource exceeds setItemCountLimitPerResource(int). Suffix creation can be customized with setResourceSuffixCreator(ResourceSuffixCreator).

Note that new resources are created only at chunk boundaries i.e. the number of items written into one resource is between the limit set by setItemCountLimitPerResource(int) and (limit + chunk size).

Robert Kasanicky, Mahmoud Ben Hassine