All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.redis.spring.batch.writer.QueueItemWriter Maven / Gradle / Ivy

There is a newer version: 4.0.7
Show newest version
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 items) throws Exception {
        for (T item : items) {
            queue.put(item);
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy