io.quarkus.redis.datasource.keys.ExpireArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-redis-client Show documentation
Show all versions of quarkus-redis-client Show documentation
Connect to Redis in either imperative or reactive style
package io.quarkus.redis.datasource.keys;
import java.util.ArrayList;
import java.util.List;
import io.quarkus.redis.datasource.RedisCommandExtraArguments;
/**
* Argument for the Redis EXPIRE and
* EXPIREAT commands.
*/
public class ExpireArgs implements RedisCommandExtraArguments {
private boolean xx;
private boolean lt;
private boolean nx;
private boolean gt;
/**
* Sets the expiry only when the key has an existing expiry
*
* @return the current {@code ExpireArgs}
**/
public ExpireArgs xx() {
this.xx = true;
return this;
}
/**
* Sets the expiry only when the new expiry is less than current one
*
* @return the current {@code ExpireArgs}
**/
public ExpireArgs lt() {
this.lt = true;
return this;
}
/**
* Sets the expiry only when the key has no expiry.
*
* @return the current {@code ExpireArgs}
**/
public ExpireArgs nx() {
this.nx = true;
return this;
}
/**
* Set the expiry only when the new expiry is greater than current one
*
* @return the current {@code ExpireArgs}
**/
public ExpireArgs gt() {
this.gt = true;
return this;
}
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy