com.redis.spring.batch.writer.QueueItemWriter Maven / Gradle / Ivy
package com.redis.spring.batch.writer;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import org.springframework.batch.item.ItemWriter;
public class QueueItemWriter implements ItemWriter {
private final BlockingQueue queue;
public QueueItemWriter(BlockingQueue queue) {
this.queue = queue;
}
@Override
public void write(List extends T> items) throws Exception {
for (T item : items) {
queue.put(item);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy