Class RedisItemWriterBuilder<K,V>
java.lang.Object
org.springframework.batch.item.redis.builder.RedisItemWriterBuilder<K,V>
Builder for
RedisItemWriter
.- Since:
- 5.1
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Validates and builds aRedisItemWriter
.delete
(boolean delete) Indicate if the items being passed to the writer should be deleted.itemKeyMapper
(org.springframework.core.convert.converter.Converter<V, K> itemKeyMapper) Set theConverter
to use to derive the key from the item.redisTemplate
(org.springframework.data.redis.core.RedisTemplate<K, V> redisTemplate) Set theRedisTemplate
to use to write items to Redis.
-
Constructor Details
-
RedisItemWriterBuilder
public RedisItemWriterBuilder()
-
-
Method Details
-
redisTemplate
public RedisItemWriterBuilder<K,V> redisTemplate(org.springframework.data.redis.core.RedisTemplate<K, V> redisTemplate) Set theRedisTemplate
to use to write items to Redis.- Parameters:
redisTemplate
- the template to use.- Returns:
- The current instance of the builder.
- See Also:
-
itemKeyMapper
public RedisItemWriterBuilder<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:
-
delete
Indicate if the items being passed to the writer should be deleted.- Parameters:
delete
- removal indicator.- Returns:
- The current instance of the builder.
- See Also:
-
build
Validates and builds aRedisItemWriter
.- Returns:
- a
RedisItemWriter
-