public class MultiResourceItemWriterBuilder<T>
extends java.lang.Object
MultiResourceItemWriter
.MultiResourceItemWriter
Constructor and Description |
---|
MultiResourceItemWriterBuilder() |
Modifier and Type | Method and Description |
---|---|
MultiResourceItemWriter<T> |
build()
Builds the
MultiResourceItemWriter . |
MultiResourceItemWriterBuilder<T> |
delegate(ResourceAwareItemWriterItemStream<? super T> delegate)
Delegate used for actual writing of the output.
|
MultiResourceItemWriterBuilder<T> |
itemCountLimitPerResource(int itemCountLimitPerResource)
After this limit is exceeded the next chunk will be written into newly created
resource.
|
MultiResourceItemWriterBuilder<T> |
name(java.lang.String name)
The name used to calculate the key within the
ExecutionContext . |
MultiResourceItemWriterBuilder<T> |
resource(org.springframework.core.io.Resource resource)
Prototype for output resources.
|
MultiResourceItemWriterBuilder<T> |
resourceSuffixCreator(ResourceSuffixCreator suffixCreator)
Allows customization of the suffix of the created resources based on the index.
|
MultiResourceItemWriterBuilder<T> |
saveState(boolean saveState)
Configure if the state of the
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes. |
public MultiResourceItemWriterBuilder<T> saveState(boolean saveState)
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes.saveState
- defaults to truepublic MultiResourceItemWriterBuilder<T> name(java.lang.String name)
ExecutionContext
. Required if
saveState(boolean)
is set to true.name
- name of the reader instanceItemStreamSupport.setName(String)
public MultiResourceItemWriterBuilder<T> resourceSuffixCreator(ResourceSuffixCreator suffixCreator)
suffixCreator
- the customizable ResourceSuffixCreator to use.MultiResourceItemWriter.setResourceSuffixCreator(ResourceSuffixCreator)
public MultiResourceItemWriterBuilder<T> itemCountLimitPerResource(int itemCountLimitPerResource)
itemCountLimitPerResource
- the max numbers of items to be written per chunk.MultiResourceItemWriter.setItemCountLimitPerResource(int)
public MultiResourceItemWriterBuilder<T> delegate(ResourceAwareItemWriterItemStream<? super T> delegate)
delegate
- The delegate to use for writing.MultiResourceItemWriter.setDelegate(ResourceAwareItemWriterItemStream)
public MultiResourceItemWriterBuilder<T> resource(org.springframework.core.io.Resource resource)
MultiResourceItemWriter.setResourceSuffixCreator(ResourceSuffixCreator)
.resource
- the prototype resource to use as the basis for creating resources.MultiResourceItemWriter.setResource(Resource)
public MultiResourceItemWriter<T> build()
MultiResourceItemWriter
.MultiResourceItemWriter