redis.clients.jedis.json.JsonSetParams Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis_preview Show documentation
Show all versions of jedis_preview Show documentation
Jedis is a blazingly small and sane Redis java client.
The newest version!
package redis.clients.jedis.json;
import redis.clients.jedis.CommandArguments;
import redis.clients.jedis.params.IParams;
public class JsonSetParams implements IParams {
private boolean nx = false;
private boolean xx = false;
public JsonSetParams() {
}
public static JsonSetParams jsonSetParams() {
return new JsonSetParams();
}
public JsonSetParams nx() {
this.nx = true;
this.xx = false;
return this;
}
public JsonSetParams xx() {
this.nx = false;
this.xx = true;
return this;
}
@Override
public void addParams(CommandArguments args) {
if (nx) {
args.add("NX");
}
if (xx) {
args.add("XX");
}
}
}