redis.clients.jedis.timeseries.DuplicatePolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis Show documentation
Show all versions of jedis Show documentation
Jedis is a blazingly small and sane Redis java client.
package redis.clients.jedis.timeseries;
import redis.clients.jedis.args.Rawable;
import redis.clients.jedis.util.SafeEncoder;
/**
* Policy that will define handling of duplicate samples.
*/
public enum DuplicatePolicy implements Rawable {
/**
* An error will occur for any out of order sample
*/
BLOCK,
/**
* Ignore the new value
*/
FIRST,
/**
* Override with latest value
*/
LAST,
/**
* Only override if the value is lower than the existing value
*/
MIN,
/**
* Only override if the value is higher than the existing value
*/
MAX,
/**
* If a previous sample exists, add the new sample to it so that the updated value is
*/
SUM;
private final byte[] raw;
private DuplicatePolicy() {
raw = SafeEncoder.encode(name());
}
@Override
public byte[] getRaw() {
return raw;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy