Class GemfireItemWriterBuilder<K,V>
- java.lang.Object
- org.springframework.batch.item.data.builder.GemfireItemWriterBuilder<K,V>
public class GemfireItemWriterBuilder<K,V> extends java.lang.Object
A builder implementation for theGemfireItemWriter
- Since:
- 4.0
- Author:
- Glenn Renfro
- See Also:
GemfireItemWriterBuilder
Constructor Summary
Constructors Constructor Description GemfireItemWriterBuilder()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GemfireItemWriter<K,V>
build()
Validates and builds aGemfireItemWriter
.GemfireItemWriterBuilder<K,V>
delete(boolean delete)
Indicates if the items being passed to the writer are to be saved or removed from the data store.GemfireItemWriterBuilder<K,V>
itemKeyMapper(org.springframework.core.convert.converter.Converter<V,K> itemKeyMapper)
Set theConverter
to use to derive the key from the item.GemfireItemWriterBuilder<K,V>
template(org.springframework.data.gemfire.GemfireTemplate template)
Establishes the GemfireTemplate the writer should use.
Method Detail
template
public GemfireItemWriterBuilder<K,V> template(org.springframework.data.gemfire.GemfireTemplate template)
Establishes the GemfireTemplate the writer should use.- Parameters:
template
- theGemfireTemplate
to set.- Returns:
- The current instance of the builder.
- See Also:
GemfireItemWriter.setTemplate(GemfireTemplate)
itemKeyMapper
public GemfireItemWriterBuilder<K,V> itemKeyMapper(org.springframework.core.convert.converter.Converter<V,K> itemKeyMapper)
Set theConverter
to use to derive the key from the item.- Parameters:
itemKeyMapper
- the Converter to use.- Returns:
- The current instance of the builder.
- See Also:
KeyValueItemWriter.setItemKeyMapper(Converter)
delete
public GemfireItemWriterBuilder<K,V> delete(boolean delete)
Indicates if the items being passed to the writer are to be saved or removed from the data store. If set to false (default), the items will be saved. If set to true, the items will be removed.- Parameters:
delete
- removal indicator.- Returns:
- The current instance of the builder.
- See Also:
KeyValueItemWriter.setDelete(boolean)
build
public GemfireItemWriter<K,V> build()
Validates and builds aGemfireItemWriter
.- Returns:
- a
GemfireItemWriter