Class BlockingQueueItemWriter<T>
java.lang.Object
org.springframework.batch.item.queue.BlockingQueueItemWriter<T>
- Type Parameters:
T
- type of items to write
- All Implemented Interfaces:
ItemWriter<T>
This is an
ItemWriter
that writes items to a BlockingQueue
.- Since:
- 5.2.0
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
ConstructorDescriptionBlockingQueueItemWriter
(BlockingQueue<T> queue) Create a newBlockingQueueItemWriter
. -
Method Summary
-
Constructor Details
-
BlockingQueueItemWriter
Create a newBlockingQueueItemWriter
.- Parameters:
queue
- the queue to write items to
-
-
Method Details
-
write
Description copied from interface:ItemWriter
Process the supplied data element. Will not be called with any null items in normal operation.- Specified by:
write
in interfaceItemWriter<T>
- Parameters:
items
- of items to be written. Must not benull
.- Throws:
Exception
- if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.
-