Class RedisItemReaderBuilder<K,V>
java.lang.Object
org.springframework.batch.item.redis.builder.RedisItemReaderBuilder<K,V>
- Type Parameters:
K- type of keysV- type of values
Builder for
RedisItemReader.- Since:
- 5.1
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a newRedisItemReader.redisTemplate(org.springframework.data.redis.core.RedisTemplate<K, V> redisTemplate) Set theRedisTemplateto use in the reader.scanOptions(org.springframework.data.redis.core.ScanOptions scanOptions) Set theScanOptionsto select the key set.
-
Constructor Details
-
RedisItemReaderBuilder
public RedisItemReaderBuilder()
-
-
Method Details
-
redisTemplate
public RedisItemReaderBuilder<K,V> redisTemplate(org.springframework.data.redis.core.RedisTemplate<K, V> redisTemplate) Set theRedisTemplateto use in the reader.- Parameters:
redisTemplate- the template to use- Returns:
- the current builder instance for fluent chaining
-
scanOptions
public RedisItemReaderBuilder<K,V> scanOptions(org.springframework.data.redis.core.ScanOptions scanOptions) Set theScanOptionsto select the key set.- Parameters:
scanOptions- the scan option to use- Returns:
- the current builder instance for fluent chaining
-
build
Build a newRedisItemReader.- Returns:
- a new item reader
-