com.redis.spring.batch.writer.operation.AbstractOperation Maven / Gradle / Ivy
package com.redis.spring.batch.writer.operation;
import java.util.function.Function;
import com.redis.spring.batch.writer.Operation;
public abstract class AbstractOperation implements Operation {
private Function key;
public void setKey(Function function) {
this.key = function;
}
public void setKey(K key) {
this.key = t -> key;
}
protected K key(T item) {
return key.apply(item);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy