com.redis.spring.batch.writer.operation.JsonDel Maven / Gradle / Ivy
package com.redis.spring.batch.writer.operation;
import java.util.List;
import java.util.function.Function;
import com.redis.lettucemod.api.async.RedisJSONAsyncCommands;
import io.lettuce.core.RedisFuture;
import io.lettuce.core.api.async.BaseRedisAsyncCommands;
public class JsonDel extends AbstractOperation {
private Function path = JsonSet.rootPath();
public void setPath(Function path) {
this.path = path;
}
@SuppressWarnings("unchecked")
@Override
public void execute(BaseRedisAsyncCommands commands, T item, List> futures) {
futures.add(((RedisJSONAsyncCommands) commands).jsonDel(key(item), path.apply(item)));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy