com.redis.spring.batch.writer.StructItemWriter Maven / Gradle / Ivy
The newest version!
package com.redis.spring.batch.writer;
import com.redis.spring.batch.writer.operation.StructWrite;
import io.lettuce.core.AbstractRedisClient;
import io.lettuce.core.codec.RedisCodec;
public class StructItemWriter extends KeyValueItemWriter {
private boolean merge;
public StructItemWriter(AbstractRedisClient client, RedisCodec codec) {
super(client, codec);
}
public void setMerge(boolean merge) {
this.merge = merge;
}
@Override
protected StructWrite writeOperation() {
StructWrite operation = new StructWrite<>();
operation.setOverwrite(!merge);
return operation;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy