Class BlockingQueueItemReaderBuilder<T>
java.lang.Object
org.springframework.batch.item.queue.builder.BlockingQueueItemReaderBuilder<T>
- Type Parameters:
T
- type of items to read
Builder for
BlockingQueueItemReader
.- Since:
- 5.2.0
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a configuredBlockingQueueItemReader
.queue
(BlockingQueue<T> queue) Set the queue to read items from.Set the reading timeout.
-
Constructor Details
-
BlockingQueueItemReaderBuilder
public BlockingQueueItemReaderBuilder()
-
-
Method Details
-
queue
Set the queue to read items from.- Parameters:
queue
- the queue to read items from.- Returns:
- this instance of the builder
-
timeout
Set the reading timeout. Defaults to 1 second.- Parameters:
timeout
- the reading timeout.- Returns:
- this instance of the builder
-
build
Create a configuredBlockingQueueItemReader
.- Returns:
- a configured
BlockingQueueItemReader
.
-